Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/src/main/java/to/bitkit/ui/sheets/SendSheet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import to.bitkit.viewmodels.SendEffect
import to.bitkit.viewmodels.SendEvent
import to.bitkit.viewmodels.WalletViewModel
import androidx.navigation.navOptions

@Composable
fun SendSheet(
Expand Down Expand Up @@ -72,7 +73,9 @@
is SendEffect.PopBack -> navController.popBackStack(it.route, inclusive = false)
is SendEffect.PaymentSuccess -> {
appViewModel.clearClipboardForAutoRead()
navController.navigate(SendRoute.Success)
navController.navigate(SendRoute.Success) {
popUpTo(startDestination) { inclusive = true }
}
}
is SendEffect.NavigateToQuickPay -> navController.navigate(SendRoute.QuickPay)
is SendEffect.NavigateToWithdrawConfirm -> navController.navigate(SendRoute.WithdrawConfirm)
Expand Down Expand Up @@ -219,7 +222,9 @@
SendQuickPayScreen(
quickPayData = requireNotNull(quickPayData),
onPaymentComplete = {
navController.navigate(SendRoute.Success)
navController.navigate(SendRoute.Success) {
popUpTo(startDestination) { inclusive = true }
}
},
onShowError = { errorMessage ->
navController.navigate(SendRoute.Error(errorMessage))
Expand Down