refactor(android): remove unnecessary non-null assertion

This commit is contained in:
Harsh Shandilya 2022-10-03 22:40:33 +05:30
parent a1ab32c43e
commit dd76c7bed7
No known key found for this signature in database

View file

@ -61,7 +61,9 @@ fun ClawNavigationBar(
navItem.listStateResetCallback()
return@NavigationBarItem
}
navController.popBackStack(navController.graph.startDestinationRoute!!, false)
navController.graph.startDestinationRoute?.let { startDestination ->
navController.popBackStack(startDestination, false)
}
if (navItem.route != Destinations.startDestination.route) {
navController.navigate(navItem.route)
}