[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 15/30: ScrollVStack
From: |
gnunet |
Subject: |
[taler-taler-ios] 15/30: ScrollVStack |
Date: |
Sun, 19 Nov 2023 23:53:39 +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 5d877d3c8824d7f769f2b37aa50393cdba967dbd
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Nov 18 17:25:32 2023 +0100
ScrollVStack
---
TalerWallet1/Views/Peer2peer/SendAmount.swift | 66 +++++++++++++--------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index 5759aea..7eef7c7 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -51,42 +51,40 @@ struct SendAmount: View {
let current = amountToTransfer.string(currencyInfo)
let insufficientLabel = String(localized: "You don't have enough
\(currency).")
let insufficientLabel2 = String(localized: "but you only have
\(available) to send.")
- ScrollView {
- VStack(alignment: .trailing) {
-// let _ = print("available: \(available)")
- Text("Available:\t\(available)")
- .accessibilityFont(.title3)
- .padding(.bottom, 2)
- CurrencyInputView(amount: $amountToTransfer,
- title: iconOnly ? String(localized: "How
much:")
- : String(localized: "Amount
to send:"),
- shortcutLabel: String(localized: "Send", comment:
"VoiceOver: Send $50,$25,$10,$5 shortcut buttons"))
- let disabled = insufficient || amountToTransfer.isZero
- Text(insufficient ? insufficientLabel
- : feeLabel)
- .accessibilityFont(.body)
- .foregroundColor(.red)
- .padding(4)
- NavigationLink(destination: LazyView {
- SendPurpose(stack: stack.push(),
- amountAvailable: amountAvailable,
- amountToTransfer: amountToTransfer,
- fee: fee,
- summary: $summary,
- expireDays: $expireDays)
- }) {
- Text("Next")
- } .buttonStyle(TalerButtonStyle(type: .prominent))
- .disabled(disabled)
- Spacer()
- }
- }
+ ScrollView { VStack(alignment: .trailing) {
+// let _ = print("available: \(available)")
+ Text("Available:\t\(available)")
+ .accessibilityFont(.title3)
+ .padding(.bottom, 2)
+ CurrencyInputView(amount: $amountToTransfer,
+ title: iconOnly ? String(localized: "How much:")
+ : String(localized: "Amount to
send:"),
+ shortcutLabel: String(localized: "Send", comment:
"VoiceOver: Send $50,$25,$10,$5 shortcut buttons"))
+ let disabled = insufficient || amountToTransfer.isZero
+ Text(insufficient ? insufficientLabel
+ : feeLabel)
+ .accessibilityFont(.body)
+ .foregroundColor(.red)
+ .padding(4)
+
+ NavigationLink(destination: LazyView {
+ SendPurpose(stack: stack.push(),
+ amountAvailable: amountAvailable,
+ amountToTransfer: amountToTransfer,
+ fee: fee,
+ summary: $summary,
+ expireDays: $expireDays)
+ }) { Text("Next") }
+ .buttonStyle(TalerButtonStyle(type: .prominent))
+ .disabled(disabled)
+ Spacer()
+ } } // ScrollVStack
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.navigationTitle(navTitle)
- .onAppear { // make CurrencyField show the keyboard
+ .onAppear {
DebugViewC.shared.setViewID(VIEW_SEND_P2P, stack: stack.push())
symLog.log("❗️Yikes SendAmount onAppear")
}
@@ -104,7 +102,9 @@ struct SendAmount: View {
if insufficient {
announce(this: "\(current), \(insufficientLabel2)")
- } else if !amountToTransfer.isZero {
+ } else if amountToTransfer.isZero {
+ fee = EMPTYSTRING
+ } else {
do {
let ppCheck = try await
model.checkPeerPushDebitM(amountToTransfer)
peerPushCheck = ppCheck
@@ -112,7 +112,7 @@ struct SendAmount: View {
// agePicker.setAges(ages: peerPushCheck?.ageRestrictionOptions)
if let feeAmount = fee(ppCheck: peerPushCheck) {
fee = feeAmount.string(currencyInfo)
- } else { fee = "" }
+ } else { fee = EMPTYSTRING }
announce(this: "\(current), \(feeLabel)")
} catch { // TODO: error
symLog.log(error.localizedDescription)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 05/30: ScrollVStack, cleanup, (continued)
- [taler-taler-ios] 05/30: ScrollVStack, cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 01/30: Bugfix: Arithmetic error, gnunet, 2023/11/19
- [taler-taler-ios] 06/30: Notifications, gnunet, 2023/11/19
- [taler-taler-ios] 19/30: tabbed button strings, gnunet, 2023/11/19
- [taler-taler-ios] 18/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 07/30: KYC, gnunet, 2023/11/19
- [taler-taler-ios] 03/30: Dismiss keyboard, gnunet, 2023/11/19
- [taler-taler-ios] 23/30: unify P2P subject, gnunet, 2023/11/19
- [taler-taler-ios] 21/30: fix shortcuts, gnunet, 2023/11/19
- [taler-taler-ios] 26/30: badge for button, gnunet, 2023/11/19
- [taler-taler-ios] 15/30: ScrollVStack,
gnunet <=
- [taler-taler-ios] 25/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 24/30: cleanup P2P, gnunet, 2023/11/19
- [taler-taler-ios] 17/30: accessibilityAddTraits, gnunet, 2023/11/19
- [taler-taler-ios] 11/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 29/30: cleanup notifications, gnunet, 2023/11/19
- [taler-taler-ios] 30/30: Bump version to 0.9.3 (27), gnunet, 2023/11/19
- [taler-taler-ios] 27/30: Remove PendingOps, gnunet, 2023/11/19
- [taler-taler-ios] 12/30: leadingCurrencySymbol, gnunet, 2023/11/19
- [taler-taler-ios] 13/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 14/30: needsKYC badge, gnunet, 2023/11/19