mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 00:57:02 +05:30
app: don't pop back stack if already on route
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
ff4dfcac61
commit
e5a6c97058
1 changed files with 1 additions and 1 deletions
|
@ -100,8 +100,8 @@ fun LobstersBottomNav(
|
||||||
selected = currentRoute == screen.route,
|
selected = currentRoute == screen.route,
|
||||||
alwaysShowLabels = false,
|
alwaysShowLabels = false,
|
||||||
onClick = {
|
onClick = {
|
||||||
navController.popBackStack(navController.graph.startDestination, false)
|
|
||||||
if (currentRoute != screen.route) {
|
if (currentRoute != screen.route) {
|
||||||
|
navController.popBackStack(navController.graph.startDestination, false)
|
||||||
navController.navigate(screen.route)
|
navController.navigate(screen.route)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue