Skip to content

Commit

Permalink
Fixing navigation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BitMavrick committed Jun 15, 2024
1 parent 2a42e41 commit 9e3740c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fun Lumolight(
val quickActionUiEvent = quickActionViewModel::onEvent
quickActionUiEvent(QuickActionUiEvent.StopStartButton)
quickActionUiEvent(QuickActionUiEvent.ToggleFlashLight(context, false))
navController.popBackStack()
navController.navigateUp()
}
)
}
Expand All @@ -80,7 +80,7 @@ fun Lumolight(
SosScreen(
sosViewModel = sosViewModel,
onExitClick = {
navController.popBackStack()
navController.navigateUp()
}
)
}
Expand All @@ -89,23 +89,23 @@ fun Lumolight(
SettingScreen(
settingUiState = settingViewModel.uiState.collectAsState().value,
settingOnEvent = settingViewModel::onEvent,
onClickBack = { navController.popBackStack() },
onClickBack = { navController.navigateUp() },
onClickAbout = { navController.navigate(Screen.AboutScreen.route) },
onClickAppearance = { navController.navigate(Screen.AppearanceScreen.route) }
)
}

composable(route = Screen.AboutScreen.route){
AboutScreen(
onClickBack = { navController.popBackStack() }
onClickBack = { navController.navigateUp() }
)
}

composable(route = Screen.AppearanceScreen.route){
AppearanceScreen(
settingUiState = settingViewModel.uiState.collectAsState().value,
settingUiEvent = settingViewModel::onEvent,
onClickBack = { navController.popBackStack() }
onClickBack = { navController.navigateUp() }
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fun FlashScreen(
delay(1000L)
time--
}
navController.popBackStack()
navController.navigateUp()
}
}

Expand Down

0 comments on commit 9e3740c

Please sign in to comment.