[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 14/35: Sound for Expired
From: |
gnunet |
Subject: |
[taler-taler-ios] 14/35: Sound for Expired |
Date: |
Thu, 27 Jul 2023 09:09:47 +0200 |
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 76b66a4ce869b476421041a964454d1ae610734b
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 24 16:05:01 2023 +0200
Sound for Expired
---
TalerWallet1/Backend/WalletCore.swift | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift
b/TalerWallet1/Backend/WalletCore.swift
index 0d86cba..3def60d 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -186,16 +186,19 @@ extension WalletCore {
do {
let decoded = try JSONDecoder().decode(TransactionTransition.self,
from: jsonData)
if decoded.newTxState != decoded.oldTxState {
- if decoded.newTxState.major == .done {
- let components =
decoded.transactionId.components(separatedBy: [":"])
- if components.count >= 3 { // txn:$txtype:$uid
- if let type = TransactionType(rawValue: components[1])
{
+ let components = decoded.transactionId.components(separatedBy:
[":"])
+ if components.count >= 3 { // txn:$txtype:$uid
+ if let type = TransactionType(rawValue: components[1]) {
+ guard type != .refresh else { return }
+ if decoded.newTxState.major == .done {
Controller.shared.playSound(type.isIncoming ? 2 :
1)
+ } else if decoded.newTxState.major == .expired {
+ Controller.shared.playSound(0)
}
+ postNotification(.TransactionStateTransition,
+ userInfo: [TRANSACTIONTRANSITION:
decoded])
}
}
- postNotification(.TransactionStateTransition,
- userInfo: [TRANSACTIONTRANSITION: decoded])
}
} catch { // rethrows
symLog.log(jsonData) // TODO: .error
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 10/35: Atkinson Hyperlegible, (continued)
- [taler-taler-ios] 10/35: Atkinson Hyperlegible, gnunet, 2023/07/27
- [taler-taler-ios] 09/35: localizations, wording, gnunet, 2023/07/27
- [taler-taler-ios] 08/35: iOS 15: show ToS, gnunet, 2023/07/27
- [taler-taler-ios] 11/35: monospacedDigit, gnunet, 2023/07/27
- [taler-taler-ios] 07/35: iOS: bump version to 0.9.3 (15), gnunet, 2023/07/27
- [taler-taler-ios] 04/35: Settings: Reset wallet, gnunet, 2023/07/27
- [taler-taler-ios] 18/35: Expiration Constants, gnunet, 2023/07/27
- [taler-taler-ios] 19/35: Move Status to top, gnunet, 2023/07/27
- [taler-taler-ios] 25/35: Simplified, gnunet, 2023/07/27
- [taler-taler-ios] 12/35: PayTo URL listRowSeparator, gnunet, 2023/07/27
- [taler-taler-ios] 14/35: Sound for Expired,
gnunet <=
- [taler-taler-ios] 27/35: Postpone update until onAppear, gnunet, 2023/07/27
- [taler-taler-ios] 31/35: Expired, pending, gnunet, 2023/07/27
- [taler-taler-ios] 35/35: iOS: bump version to 0.9.3 (16), gnunet, 2023/07/27
- [taler-taler-ios] 22/35: extension TransactionsListView.Content => TransactionsRowsView, gnunet, 2023/07/27
- [taler-taler-ios] 21/35: fanblades.slash and clock.badge.xmark not in iOS 15, gnunet, 2023/07/27
- [taler-taler-ios] 13/35: SendDone, gnunet, 2023/07/27
- [taler-taler-ios] 17/35: Warnings and hints no longer use "coins", gnunet, 2023/07/27
- [taler-taler-ios] 26/35: debug, cleanup, gnunet, 2023/07/27
- [taler-taler-ios] 30/35: small fixes, gnunet, 2023/07/27
- [taler-taler-ios] 32/35: TransactionDetailView, gnunet, 2023/07/27