diff --git a/app/src/main/java/me/zobrist/tichucounter/MainActivity.kt b/app/src/main/java/me/zobrist/tichucounter/MainActivity.kt index 011c2a6..09344dc 100644 --- a/app/src/main/java/me/zobrist/tichucounter/MainActivity.kt +++ b/app/src/main/java/me/zobrist/tichucounter/MainActivity.kt @@ -240,16 +240,10 @@ class MainActivity : BaseActivity() { onClick = { scope.launch { drawerState.close() } navController.navigate(screen.route) { - // Pop up to the start destination of the graph to - // avoid building up a large stack of destinations - // on the back stack as users select items popUpTo(navController.graph.findStartDestination().id) { saveState = true } - // Avoid multiple copies of the same destination when - // reselecting the same item launchSingleTop = true - // Restore state when reselecting a previously selected item restoreState = true } }, @@ -263,7 +257,7 @@ class MainActivity : BaseActivity() { drawerState, scope, navController, - counterViewModel.keyboardHidden + counterViewModel.keyboardHidden && (currentDestination?.hierarchy?.any { it.route == "counter" } == true) ) { counterViewModel.keyboardHidden = false } } }