gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 193/204: Sound


From: gnunet
Subject: [taler-taler-ios] 193/204: Sound
Date: Thu, 05 Dec 2024 23:52:41 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 39fc81c308a4783fb9d79b1a66b9dec903ce3e98
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Dec 5 22:36:51 2024 +0100

    Sound
---
 TalerWallet1/Backend/WalletCore.swift | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift 
b/TalerWallet1/Backend/WalletCore.swift
index 51fba65..03d29c6 100644
--- 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

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]