Updated on 2026-08-14
This commit is contained in:
parent
0e42927a62
commit
398c3a4fde
6 changed files with 87 additions and 24 deletions
|
|
@ -303,12 +303,13 @@ internal class DefaultSendComponent @AssistedInject constructor(
|
|||
val isEmptyStack = childStack.value.backStack.isEmpty()
|
||||
val isSuccess = model.uiState.value.confirmUM is ConfirmUM.Success
|
||||
val isStubComponent = childStack.value.active.instance is StubComponent
|
||||
val isSendingInProgress = (model.uiState.value.confirmUM as? ConfirmUM.Content)?.isSending == true
|
||||
|
||||
val isPopSend = isEmptyRoute || isEmptyStack || isSuccess || isStubComponent
|
||||
if (isPopSend) {
|
||||
router.pop()
|
||||
} else {
|
||||
stackNavigation.pop()
|
||||
when {
|
||||
isSendingInProgress -> Unit // Do not anything while transaction sending in progress
|
||||
isPopSend -> router.pop()
|
||||
else -> stackNavigation.pop()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,11 +215,13 @@ internal class DefaultNFTSendComponent @AssistedInject constructor(
|
|||
val isEmptyRoute = childStack.value.active.configuration == CommonSendRoute.Empty
|
||||
val isEmptyStack = childStack.value.backStack.isEmpty()
|
||||
val isSuccess = model.uiState.value.confirmUM is ConfirmUM.Success
|
||||
val isSendingInProgress = (model.uiState.value.confirmUM as? ConfirmUM.Content)?.isSending == true
|
||||
|
||||
if (isEmptyRoute || isEmptyStack || isSuccess) {
|
||||
router.pop()
|
||||
} else {
|
||||
stackNavigation.pop()
|
||||
val isPopSend = isEmptyRoute || isEmptyStack || isSuccess
|
||||
when {
|
||||
isSendingInProgress -> Unit // Do not anything while transaction sending in progress
|
||||
isPopSend -> router.pop()
|
||||
else -> stackNavigation.pop()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue