commit ffe69abc0d0f868968d848a56013aa58817bee39
parent 46c74da8f252405ba1af8df3787ab259018e3cba
Author: Marc Stibane <marc@taler.net>
Date: Tue, 25 Aug 2026 17:42:44 +0200
dismiss if deleted
Diffstat:
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryList.swift b/TalerWallet1/Views/Transactions/TransactionSummaryList.swift
@@ -103,9 +103,13 @@ struct TransactionSummaryList: View {
@MainActor
@discardableResult
func checkDismiss(_ notification: Notification, _ logStr: String = EMPTYSTRING) -> Bool {
- if hasDone {
- if let transition = notification.userInfo?[TRANSACTIONTRANSITION] as? TransactionTransition {
- if transition.transactionId == talerTX.common.transactionId { // is the transition for THIS transaction?
+ if let transition = notification.userInfo?[TRANSACTIONTRANSITION] as? TransactionTransition {
+ if transition.transactionId == talerTX.common.transactionId { // is the transition for THIS transaction?
+ if transition.newTxState.major == .deleted {
+ dismissTop(stack.push()) // dissmiss the sheet / the navigation stack
+ return true
+ }
+ if hasDone {
symLog.log(logStr)
if talerTX.common.type.isPayment {
checkReload(stack.push("checkDismiss1"), notification, logStr)
@@ -113,10 +117,10 @@ struct TransactionSummaryList: View {
dismissTop(stack.push()) // if this view is in a sheet then dissmiss the sheet
return true
}
+ } else { // no sheet but the details view -> reload
+ checkReload(stack.push("checkDismiss2"), notification, logStr)
}
}
- } else { // no sheet but the details view -> reload
- checkReload(stack.push("checkDismiss2"), notification, logStr)
}
return false
}