taler-ios

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

commit d4666cebb9a34ad4ee4c042d2ba50afe01ed0b06
parent 5efb9f682382646284e03a543e10824d259c0939
Author: Marc Stibane <marc@taler.net>
Date:   Tue, 30 Jul 2024 09:25:31 +0200

cleanup

Diffstat:
MTalerWallet1/Views/Sheets/Payment/PayTemplateV.swift | 26+++++++++++++-------------
MTalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift | 2+-
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift b/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift @@ -159,14 +159,14 @@ struct PayTemplateV: View { .background(NavigationLink(destination: finalDestinationI, isActive: $buttonSelected1) { EmptyView() }.frame(width: 0).opacity(0).hidden()) } - } // ScrollView + } // amountInput } else if summaryIsEditable { // template contract summary is not fixed => let the user input a summary ScrollView { inputDestination .background(NavigationLink(destination: finalDestinationI, isActive: $buttonSelected2) { EmptyView() }.frame(width: 0).opacity(0).hidden() ) - } + } // inputDestination } else { // both template contract amount and summary are fixed => directly show the payment // Attention: contains a List, thus mustn't be included in a ScrollView PaymentView(stack: stack.push(), @@ -177,18 +177,18 @@ struct PayTemplateV: View { amountIsEditable: amountIsEditable, summaryIsEditable: summaryIsEditable) } - }.navigationTitle(navTitle) - .frame(maxWidth: .infinity, alignment: .leading) - .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) - .task(id: controller.currencyTicker) { - let currency = amountToTransfer.currencyStr - currencyInfo = controller.info(for: currency, controller.currencyTicker) + } .navigationTitle(navTitle) + .frame(maxWidth: .infinity, alignment: .leading) + .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) + .task(id: controller.currencyTicker) { + let currency = amountToTransfer.currencyStr + currencyInfo = controller.info(for: currency, controller.currencyTicker) // currencyName = currencyInfo.scope.currency - } - .onAppear() { - symLog.log("onAppear") - DebugViewC.shared.setSheetID(SHEET_PAY_TEMPLATE) - } + } + .onAppear() { + symLog.log("onAppear") + DebugViewC.shared.setSheetID(SHEET_PAY_TEMPLATE) + } } else { LoadingView(scopeInfo: nil, message: url.host) .task { diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift @@ -188,7 +188,7 @@ struct WithdrawURIView: View { let message: String? = nil #endif LoadingView(scopeInfo: nil, message: message) - .task { + .task { // this runs only once symLog.log(".task") if let uriInfoResponse = try? await model.getWithdrawalDetailsForUriM(url.absoluteString) { let amount = uriInfoResponse.amount