commit b9e61e56b8bacec8576aa317d99c842b7b1cd754 parent 5cb8039b4c67411f8bbba385318285aea2be5670 Author: Marc Stibane <marc@taler.net> Date: Sat, 13 Jul 2024 23:43:29 +0200 Bugfix: List mustn't be in ScrollView Diffstat:
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/AmountInputV.swift b/TalerWallet1/Views/HelperViews/AmountInputV.swift @@ -57,7 +57,7 @@ struct AmountInputV: View { let insufficientLabel = String(localized: "You don't have enough \(currency).") let available = amountAvailable?.formatted(currencyInfo) ?? nil let flags = checkAvailable(amount: amountToTransfer) - ScrollView { VStack(alignment: .trailing) { + VStack(alignment: .trailing) { if summary.count > 0 { Text(summary) .talerFont(.body) @@ -91,7 +91,7 @@ struct AmountInputV: View { Button("Next") { buttonAction() } .buttonStyle(TalerButtonStyle(type: .prominent, disabled: flags.disabled)) .disabled(flags.disabled) - }.padding(.horizontal) } // ScrollVStack + }.padding(.horizontal) .frame(maxWidth: .infinity, alignment: .leading) .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) .onAppear() { diff --git a/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift b/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift @@ -153,7 +153,8 @@ struct PayTemplateV: View { { EmptyView() }.frame(width: 0).opacity(0).hidden() ) } - } else { // both template contract amount and summary are fixed => directly show the payment + } 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(), url: url, template: true, diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift @@ -58,7 +58,7 @@ struct WithdrawURIView: View { var body: some View { if possibleExchanges.count > 0 { if let defaultBaseUrl = defaultExchangeBaseUrl ?? possibleExchanges.first?.exchangeBaseUrl { - ScrollView { VStack { + VStack { let title = String(localized: "Exchange") if possibleExchanges.count > 1 { Picker(title, selection: $selectedExchange) { @@ -87,6 +87,7 @@ struct WithdrawURIView: View { amountToTransfer: $amountToTransfer, exchange: $exchange) if amountIsEditable { // amountToTransfer.isZero { + ScrollView { let shortcutDestination = LazyView { WithdrawAcceptView(stack: stack.push(), url: url, amountToTransfer: $amountShortcut, @@ -113,10 +114,11 @@ struct WithdrawURIView: View { .background(NavigationLink(destination: acceptDestination, isActive: $buttonSelected) { EmptyView() }.frame(width: 0).opacity(0).hidden() ) + } } else { acceptDestination } - } } // ScrollVStack + } .navigationTitle(navTitle) .onAppear() { symLog.log("onAppear")