Fixing click home button to go to the top of the home feed.

This commit is contained in:
Vitor Pamplona
2023-01-21 13:07:47 -03:00
parent 733801fddf
commit ffe58f3d41

View File

@@ -59,9 +59,10 @@ fun AppBottomBar(navController: NavHostController) {
// TODO: Make it scrool to the top // TODO: Make it scrool to the top
navController.navigate(item.route){ navController.navigate(item.route){
navController.graph.startDestinationRoute?.let { start -> navController.graph.startDestinationRoute?.let { start ->
popUpTo(start) popUpTo(start) { inclusive = item.route == Route.Home.route }
restoreState = true restoreState = true
} }
launchSingleTop = true launchSingleTop = true
restoreState = true restoreState = true
} }