commit 39fc81c308a4783fb9d79b1a66b9dec903ce3e98 parent ef5ccd2aee4138afb55f2c2bb9f2875e3a4bf82e Author: Marc Stibane <marc@taler.net> Date: Thu, 5 Dec 2024 22:36:51 +0100 Sound Diffstat:
| M | TalerWallet1/Backend/WalletCore.swift | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift @@ -213,13 +213,18 @@ extension WalletCore { guard type != .refresh else { return } let newMajor = decoded.newTxState.major let newMinor = decoded.newTxState.minor + let oldMinor = decoded.oldTxState.minor switch newMajor { case .done: logger.info("Done: \(decoded.transactionId, privacy: .private(mask: .hash))") if type.isWithdrawal { - Controller.shared.playSound(2) // payment_received only for withdrawals + Controller.shared.playSound(2) // play payment_received only for withdrawals } else if !type.isIncoming { - Controller.shared.playSound(1) // payment_sent for all outgoing tx + if !(oldMinor == .autoRefund || oldMinor == .acceptRefund) { + Controller.shared.playSound(1) // play payment_sent for all outgoing tx + } + } else { // incoming but not withdrawal + logger.info("incoming payment done - NO sound - \(type.rawValue)") } postNotification(.TransactionDone, userInfo: [TRANSACTIONTRANSITION: decoded]) return