fix(android): check for previous back stack entry

This commit is contained in:
Harsh Shandilya 2023-06-07 02:05:14 +05:30
parent 5206851b22
commit 02575a917b
No known key found for this signature in database

View file

@ -138,7 +138,10 @@ fun LobstersApp(
topBar = {
ClawAppBar(
navigationIcon = {
if (navItems.none { it.route == currentDestination }) {
if (
navController.previousBackStackEntry != null &&
navItems.none { it.route == currentDestination }
) {
IconButton(
onClick = { if (!navController.popBackStack()) context.getActivity()?.finish() }
) {