taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit a4ea011a17a072562e65287b0621af5a4c586b59
parent d6559355546187f5cb2b3ba82bf2a433b722c85b
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 10 Sep 2026 15:11:38 +0200

Don't vibrate/sound on delete

Diffstat:
MTalerWallet1/Backend/WalletCore.swift | 5++++-
MTalerWallet1/Controllers/PublicConstants.swift | 1+
MTalerWallet1/Views/Main/WalletMain.swift | 4++++
3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift @@ -318,7 +318,10 @@ extension WalletCore { case .aborting, .aborted: logger.log("handleStateTransition: Aborting: \(decoded.transactionId, privacy: .private(mask: .hash))") postNotification(.TransactionStateTransition, userInfo: [TRANSACTIONTRANSITION: decoded]) - case .expired, .deleted: + case .deleted: + logger.warning("handleStateTransition: Deleted: \(decoded.transactionId, privacy: .private(mask: .hash))") + postNotification(.TransactionDeleted, userInfo: [TRANSACTIONTRANSITION: decoded]) + case .expired: logger.warning("handleStateTransition: Expired: \(decoded.transactionId, privacy: .private(mask: .hash))") if let index = expired.firstIndex(of: components[2]) { expired.remove(at: index) // don't beep twice diff --git a/TalerWallet1/Controllers/PublicConstants.swift b/TalerWallet1/Controllers/PublicConstants.swift @@ -231,6 +231,7 @@ extension Notification.Name { static let TransactionStateTransition = Notification.Name("transaction-state-transition") static let TransactionDone = Notification.Name("transaction-done") static let TransactionExpired = Notification.Name("transaction-expired") + static let TransactionDeleted = Notification.Name("transaction-deleted") static let TransactionScanned = Notification.Name("transaction-scanned") static let PendingReady = Notification.Name("pending-ready") static let WaitReserve = Notification.Name("wait-reserve") diff --git a/TalerWallet1/Views/Main/WalletMain.swift b/TalerWallet1/Views/Main/WalletMain.swift @@ -347,6 +347,10 @@ struct WalletMain: View { // } shouldReloadBalances += 1 } + .onNotification(.TransactionDeleted) { notification in + logger.info(".onNotification(.TransactionDeleted) ==> reload balances") + shouldReloadTransactions += 1 + } .onNotification(.TransactionExpired) { notification in logger.info(".onNotification(.TransactionExpired) ==> reload balances") shouldReloadTransactions += 1