Updated on 2026-08-14
This commit is contained in:
parent
6dcce60fb4
commit
9febfba321
6 changed files with 9 additions and 7 deletions
|
|
@ -20,8 +20,7 @@ private fun internalReduce(action: Action, state: AppState): NavigationState {
|
|||
navState.copy(backStack = navState.backStack + navigationAction.screen)
|
||||
}
|
||||
is NavigationAction.PopBackTo -> {
|
||||
val screen =
|
||||
navigationAction.screen ?: navState.activity?.get()?.getPreviousScreen()
|
||||
val screen = navigationAction.screen ?: navState.activity?.get()?.getPreviousScreen()
|
||||
val index = navState.backStack.lastIndexOf(screen) + 1
|
||||
state.navigationState.copy(backStack = navState.backStack.subList(0, index))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue