Add logging to start destination

This commit is contained in:
Kirill Kamakin
2022-11-03 19:15:11 +01:00
parent 610f3e9377
commit 270707c434

View File

@@ -47,8 +47,9 @@ class MainActivity : AppCompatActivity() {
} }
private fun configureNavGraph() { private fun configureNavGraph() {
val graph = navController.navInflater.inflate(R.navigation.nav_graph)
viewModel.startDestination.observeOnce(this) { viewModel.startDestination.observeOnce(this) {
logger.d { "configureNavGraph: received destination" }
val graph = navController.navInflater.inflate(R.navigation.nav_graph)
graph.setStartDestination(it) graph.setStartDestination(it)
navController.setGraph(graph, intent.extras) navController.setGraph(graph, intent.extras)
} }