Show fab only on counter screen.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-21 18:21:40 +01:00
parent c1567efe52
commit 33e57bcfd7

View File

@@ -240,16 +240,10 @@ class MainActivity : BaseActivity() {
onClick = { onClick = {
scope.launch { drawerState.close() } scope.launch { drawerState.close() }
navController.navigate(screen.route) { 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) { popUpTo(navController.graph.findStartDestination().id) {
saveState = true saveState = true
} }
// Avoid multiple copies of the same destination when
// reselecting the same item
launchSingleTop = true launchSingleTop = true
// Restore state when reselecting a previously selected item
restoreState = true restoreState = true
} }
}, },
@@ -263,7 +257,7 @@ class MainActivity : BaseActivity() {
drawerState, drawerState,
scope, scope,
navController, navController,
counterViewModel.keyboardHidden counterViewModel.keyboardHidden && (currentDestination?.hierarchy?.any { it.route == "counter" } == true)
) { counterViewModel.keyboardHidden = false } ) { counterViewModel.keyboardHidden = false }
} }
} }