mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 04:07:03 +05:30
fix: remove dubious return
This commit is contained in:
parent
5a098e125a
commit
3db05fb3b1
2 changed files with 14 additions and 14 deletions
|
@ -67,14 +67,14 @@ fun ClawNavigationBar(
|
||||||
onClick = {
|
onClick = {
|
||||||
if (isCurrentDestination) {
|
if (isCurrentDestination) {
|
||||||
navItem.listStateResetCallback()
|
navItem.listStateResetCallback()
|
||||||
return@NavigationBarItem
|
} else {
|
||||||
}
|
|
||||||
navController.graph.startDestinationRoute?.let { startDestination ->
|
navController.graph.startDestinationRoute?.let { startDestination ->
|
||||||
navController.popBackStack(startDestination, false)
|
navController.popBackStack(startDestination, false)
|
||||||
}
|
}
|
||||||
if (navItem.route != Destinations.startDestination.route) {
|
if (navItem.route != Destinations.startDestination.route) {
|
||||||
navController.navigate(navItem.route)
|
navController.navigate(navItem.route)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.testTag(navItem.label.uppercase()),
|
modifier = Modifier.testTag(navItem.label.uppercase()),
|
||||||
)
|
)
|
||||||
|
|
|
@ -66,14 +66,14 @@ fun ClawNavigationRail(
|
||||||
onClick = {
|
onClick = {
|
||||||
if (isCurrentDestination) {
|
if (isCurrentDestination) {
|
||||||
navItem.listStateResetCallback()
|
navItem.listStateResetCallback()
|
||||||
return@NavigationRailItem
|
} else {
|
||||||
}
|
|
||||||
navController.graph.startDestinationRoute?.let { startDestination ->
|
navController.graph.startDestinationRoute?.let { startDestination ->
|
||||||
navController.popBackStack(startDestination, false)
|
navController.popBackStack(startDestination, false)
|
||||||
}
|
}
|
||||||
if (navItem.route != Destinations.startDestination.route) {
|
if (navItem.route != Destinations.startDestination.route) {
|
||||||
navController.navigate(navItem.route)
|
navController.navigate(navItem.route)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.testTag(navItem.label.uppercase()),
|
modifier = Modifier.testTag(navItem.label.uppercase()),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue