bugfix: tapping "Home" in navigation drawer should simply close it without any navigation action.
This commit is contained in:
parent
5b7619f000
commit
4e07a377a3
|
|
@ -134,7 +134,13 @@ private fun DrawerContent(
|
|||
icon = Icons.Default.Home,
|
||||
label = "Home",
|
||||
isSelected = currentRoute == AppDestinations.MODEL_SELECTION_ROUTE,
|
||||
onClick = { onNavigate { navigationActions.navigateToModelSelection() } }
|
||||
onClick = {
|
||||
if (currentRoute != AppDestinations.MODEL_SELECTION_ROUTE) {
|
||||
onNavigate { navigationActions.navigateToModelSelection() }
|
||||
} else {
|
||||
onNavigate { /* No-op: simply close drawer */ }
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
|
|
|||
Loading…
Reference in New Issue