Successfully modified file: /home/Messier82/projects/service-book/app/src/main/java/com/yorvana/MainActivity.kt (1 replacements). Here is the updated code: ... ) } // key(dest) re-creates AppNavGraph when the destination flips between Setup and // VehicleList, so rememberNavBackStack starts fresh with the correct root. val vaultUriString by remember { application.preferences.preferences .map { it.vaultUriString } }.collectAsStateWithLifecycle(initialValue = null) android.util.Log.d("MainActivity", "Recomposing MainContent: dest=$startDestination, uri=$vaultUriString") startDestination?.let { dest -> key(dest) { AppNavGraph(startDestination = dest) } } }