Updated on 2026-08-14
This commit is contained in:
parent
10171a3b3e
commit
ecf8e5fc96
19 changed files with 125 additions and 55 deletions
|
|
@ -140,9 +140,9 @@ class DetailsMiddleware {
|
|||
val isLocked = runCatching { userWalletsListManager.asLockable()?.isLockedSync }
|
||||
.fold(onSuccess = { true }, onFailure = { false })
|
||||
if (isLocked && userWalletsListManager.hasUserWallets) {
|
||||
store.dispatchNavigationAction { popTo<AppRoute.Welcome>() }
|
||||
store.dispatchNavigationAction { replaceAll(AppRoute.Welcome()) }
|
||||
} else {
|
||||
store.dispatchNavigationAction { popTo<AppRoute.Home>() }
|
||||
store.dispatchNavigationAction { replaceAll(AppRoute.Home) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ private fun handlePrepareScreen(action: DetailsAction.PrepareScreen, state: AppS
|
|||
return DetailsState(
|
||||
scanResponse = action.scanResponse,
|
||||
// If the current screen is ResetToFactory, we must save the ResetToFactory's state
|
||||
cardSettingsState = if (router.backStack.lastOrNull() is AppRoute.ResetToFactory) {
|
||||
cardSettingsState = if (router.stack.lastOrNull() is AppRoute.ResetToFactory) {
|
||||
state.detailsState.cardSettingsState
|
||||
} else {
|
||||
null
|
||||
|
|
|
|||
|
|
@ -157,11 +157,7 @@ internal class SaveWalletMiddleware {
|
|||
|
||||
private fun navigateToWallet() {
|
||||
store.dispatchNavigationAction {
|
||||
popTo<AppRoute.Wallet> { isSuccess ->
|
||||
if (!isSuccess) {
|
||||
clear { push(AppRoute.Wallet) }
|
||||
}
|
||||
}
|
||||
replaceAll(AppRoute.Wallet)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue