[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 06/08: Confirm later instead of Done for bank-integrat
From: |
gnunet |
Subject: |
[taler-taler-ios] 06/08: Confirm later instead of Done for bank-integrated withdrawals |
Date: |
Mon, 03 Jul 2023 10:27:42 +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 6a9057d59fe665b1c72b52dfc179470c591e93cf
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 3 09:45:36 2023 +0200
Confirm later instead of Done for bank-integrated withdrawals
---
TalerWallet1/Backend/Transaction.swift | 9 +++++++++
TalerWallet1/Views/Transactions/TransactionDetailView.swift | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/TalerWallet1/Backend/Transaction.swift
b/TalerWallet1/Backend/Transaction.swift
index cf323aa..92007b6 100644
--- a/TalerWallet1/Backend/Transaction.swift
+++ b/TalerWallet1/Backend/Transaction.swift
@@ -414,6 +414,15 @@ enum Transaction: Decodable, Hashable, Identifiable {
var isResumable : Bool { common.txActions.contains(.resume) }
var isSuspendable: Bool { common.txActions.contains(.suspend) }
+ var shouldConfirm: Bool {
+ switch self {
+ case .withdrawal(let withdrawalTransaction):
+ let details = withdrawalTransaction.details.withdrawalDetails
+ return details.type == .bankIntegrated // &&
details.bankConfirmationUrl != nil
+ default:
+ return false
+ }
+ }
var common: TransactionCommon {
switch self {
case .dummy(let dummyTransaction):
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index 865e2d8..5afa92b 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -89,8 +89,8 @@ struct TransactionDetailView: View {
.listStyle(myListStyle.style).anyView
.safeAreaInset(edge: .bottom) {
if let doneAction {
- Button("Done", action: doneAction)
- .buttonStyle(TalerButtonStyle(type: .prominent))
+ Button(transaction.shouldConfirm ? "Confirm later" :
"Done", action: doneAction)
+ .buttonStyle(TalerButtonStyle(type:
transaction.shouldConfirm ? .bordered : .prominent))
.padding(.horizontal)
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (f7f01e5 -> 53fe45f), gnunet, 2023/07/03
- [taler-taler-ios] 03/08: don't show Up+Down for pending and uncompleted, gnunet, 2023/07/03
- [taler-taler-ios] 04/08: accessibility, gnunet, 2023/07/03
- [taler-taler-ios] 02/08: playSound, wording, gnunet, 2023/07/03
- [taler-taler-ios] 01/08: Localization issues, gnunet, 2023/07/03
- [taler-taler-ios] 07/08: playSound, gnunet, 2023/07/03
- [taler-taler-ios] 05/08: Profile for Testers, gnunet, 2023/07/03
- [taler-taler-ios] 08/08: iOS: bump version to 0.9.3 (11), gnunet, 2023/07/03
- [taler-taler-ios] 06/08: Confirm later instead of Done for bank-integrated withdrawals,
gnunet <=