taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit d76f313adb720e9d1c627f19b962ca707605d50f
parent f5d91579a485d153f3c717b1a2778448cd25066e
Author: Marc Stibane <marc@taler.net>
Date:   Mon, 25 Nov 2024 20:50:08 +0100

fix deposit

Diffstat:
MTalerWallet1/Views/Actions/Banking/DepositAmountView.swift | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift b/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift @@ -97,8 +97,9 @@ struct DepositAmountView: View { symLog.log("Deposit") if let result = try? await model.createDepositGroup(paytoUri, amount: amountToTransfer) { symLog.log(result.transactionId) - ViewState2.shared.popToRootView(stack.push()) +// ViewState2.shared.popToRootView(stack.push()) NotificationCenter.default.post(name: .TransactionDone, object: nil, userInfo: nil) + dismissTop(stack.push()) } else { depositStarted = false } @@ -115,6 +116,11 @@ struct DepositAmountView: View { LoadingView(scopeInfo: nil, message: "Depositing...") .navigationBarBackButtonHidden(true) .interactiveDismissDisabled() // can only use "Done" button to dismiss + .safeAreaInset(edge: .bottom) { + Button("Abort") { dismissTop(stack.push()) } + .buttonStyle(TalerButtonStyle(type: .prominent)) + .padding(.horizontal) + } } else { Group { if let balance { let scopeInfo = balance.scopeInfo @@ -148,6 +154,7 @@ struct DepositAmountView: View { .padding(4) Button(buttonTitle(amountToTransfer)) { startDeposit() } .buttonStyle(TalerButtonStyle(type: .prominent, disabled: disabled || depositStarted)) + .padding(.horizontal) .disabled(disabled || depositStarted) .accessibilityHint(disabled ? String(localized: "enabled when amount is non-zero, but not higher than your available amount") : EMPTYSTRING) } else { // no balance - Yikes