[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 138/204: recvDisabled
From: |
gnunet |
Subject: |
[taler-taler-ios] 138/204: recvDisabled |
Date: |
Thu, 05 Dec 2024 23:51:46 +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 af8c222dde2ee05c94f7887a330ffcacb7b3dcc9
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Nov 18 16:09:52 2024 +0100
recvDisabled
---
TalerWallet1/Views/Actions/ActionsSheet.swift | 5 +++--
TalerWallet1/Views/Actions/DepositWithdrawV.swift | 2 ++
TalerWallet1/Views/Actions/SendRequestV.swift | 2 ++
TalerWallet1/Views/Actions/TwoRowButtons.swift | 7 +++++--
4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift
b/TalerWallet1/Views/Actions/ActionsSheet.swift
index 566d6a0..1047696 100644
--- a/TalerWallet1/Views/Actions/ActionsSheet.swift
+++ b/TalerWallet1/Views/Actions/ActionsSheet.swift
@@ -77,8 +77,9 @@ struct ActionsSheet: View {
}
let sendDisabled = !canSend
- SendRequestV(stack: stack.push(), sendDisabled: sendDisabled)
- DepositWithdrawV(stack: stack.push(), sendDisabled: sendDisabled)
+ let recvDisabled = controller.balances.count == 0
+ SendRequestV(stack: stack.push(), sendDisabled: sendDisabled,
recvDisabled: recvDisabled)
+ DepositWithdrawV(stack: stack.push(), sendDisabled: sendDisabled,
recvDisabled: recvDisabled)
QRButton(isNavBarItem: false) {
qrButtonTapped = true
}
diff --git a/TalerWallet1/Views/Actions/DepositWithdrawV.swift
b/TalerWallet1/Views/Actions/DepositWithdrawV.swift
index fed3ba4..62f0aca 100644
--- a/TalerWallet1/Views/Actions/DepositWithdrawV.swift
+++ b/TalerWallet1/Views/Actions/DepositWithdrawV.swift
@@ -11,6 +11,7 @@ import SwiftUI
struct DepositWithdrawV: View {
let stack: CallStack
let sendDisabled: Bool // can't send/deposit if wallet has no coins at
all
+ let recvDisabled: Bool // can't receive/withdraw if wallet has no
payments services
var body: some View {
let depositTitle = String(localized: "DepositButton_Short",
defaultValue: "Deposit",
@@ -26,6 +27,7 @@ struct DepositWithdrawV: View {
recvA11y: withdrawTitle,
sendDisabled: sendDisabled,
sendAction: .DepositAction,
+ recvDisabled: recvDisabled,
recvAction: .WithdrawAction)
}
}
diff --git a/TalerWallet1/Views/Actions/SendRequestV.swift
b/TalerWallet1/Views/Actions/SendRequestV.swift
index 42cfa59..6c604cb 100644
--- a/TalerWallet1/Views/Actions/SendRequestV.swift
+++ b/TalerWallet1/Views/Actions/SendRequestV.swift
@@ -11,6 +11,7 @@ import SwiftUI
struct SendRequestV: View {
let stack: CallStack
let sendDisabled: Bool // can't send/deposit if wallet has no coins at
all
+ let recvDisabled: Bool // can't receive/withdraw if wallet has no
payments services
var body: some View {
let sendTitle = String(localized: "SendButton_Short", defaultValue:
"Send",
@@ -26,6 +27,7 @@ struct SendRequestV: View {
recvA11y: requTitle,
sendDisabled: sendDisabled,
sendAction: .SendAction,
+ recvDisabled: recvDisabled,
recvAction: .RequestAction)
}
}
diff --git a/TalerWallet1/Views/Actions/TwoRowButtons.swift
b/TalerWallet1/Views/Actions/TwoRowButtons.swift
index de19edb..3506d1d 100644
--- a/TalerWallet1/Views/Actions/TwoRowButtons.swift
+++ b/TalerWallet1/Views/Actions/TwoRowButtons.swift
@@ -105,8 +105,9 @@ struct TwoRowButtons: View {
let recvTitle: String
var recvType: TransactionType
let recvA11y: String
- let sendDisabled: Bool
+ let sendDisabled: Bool // can't send/deposit if wallet has no coins at
all
let sendAction: NSNotification.Name
+ let recvDisabled: Bool // can't receive/withdraw if wallet has no
payments services
let recvAction: NSNotification.Name
func sendButton(_ title: String) -> TypeButton {
@@ -123,7 +124,7 @@ struct TwoRowButtons: View {
title: title,
a11y: recvA11y,
type: recvType,
- disabled: false,
+ disabled: recvDisabled,
action: recvAction)
}
@@ -163,6 +164,7 @@ struct TwoRowButtons_Previews: PreviewProvider {
recvA11y: "Request " + LONGCURRENCY,
sendDisabled: true,
sendAction: .SendAction,
+ recvDisabled: false,
recvAction: .RequestAction)
.listRowSeparator(.hidden)
TwoRowButtons(stack: CallStack("Preview"),
@@ -174,6 +176,7 @@ struct TwoRowButtons_Previews: PreviewProvider {
recvA11y: "Request " + DEMOCURRENCY,
sendDisabled: true,
sendAction: .SendAction,
+ recvDisabled: false,
recvAction: .RequestAction)
.listRowSeparator(.hidden)
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 155/204: ensure to pay only ONCE, (continued)
- [taler-taler-ios] 155/204: ensure to pay only ONCE, gnunet, 2024/12/05
- [taler-taler-ios] 162/204: KnownBankAccounts, gnunet, 2024/12/05
- [taler-taler-ios] 159/204: getTransactionById, gnunet, 2024/12/05
- [taler-taler-ios] 178/204: remove etag, gnunet, 2024/12/05
- [taler-taler-ios] 148/204: dismiss only if done, gnunet, 2024/12/05
- [taler-taler-ios] 146/204: smaller tx icon in lists, gnunet, 2024/12/05
- [taler-taler-ios] 156/204: fix button position, gnunet, 2024/12/05
- [taler-taler-ios] 168/204: wording, gnunet, 2024/12/05
- [taler-taler-ios] 170/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 169/204: debug, gnunet, 2024/12/05
- [taler-taler-ios] 138/204: recvDisabled,
gnunet <=
- [taler-taler-ios] 172/204: a11y for tabBar, gnunet, 2024/12/05
- [taler-taler-ios] 173/204: update after +, gnunet, 2024/12/05
- [taler-taler-ios] 174/204: only in debug mode, gnunet, 2024/12/05
- [taler-taler-ios] 176/204: cleanup, comments, gnunet, 2024/12/05
- [taler-taler-ios] 179/204: Bump version to 0.13.8 (0.13.13), gnunet, 2024/12/05
- [taler-taler-ios] 180/204: Comparable, gnunet, 2024/12/05
- [taler-taler-ios] 181/204: don't update if same data, gnunet, 2024/12/05
- [taler-taler-ios] 188/204: regional exchange baseURL, gnunet, 2024/12/05
- [taler-taler-ios] 182/204: L10N helper, gnunet, 2024/12/05
- [taler-taler-ios] 184/204: don't add to knownBankAccounts, gnunet, 2024/12/05