taler-ios

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

commit ae1096c76d88376d05ad57ff578eedf0ae6e53b9
parent 5c21ff2957f869ee8205ddab95aaf591d7e96be0
Author: Marc Stibane <marc@taler.net>
Date:   Fri, 21 Feb 2025 23:04:01 +0100

cleanup

Diffstat:
MTalerWallet1/Views/Actions/Banking/ManualWithdraw.swift | 2+-
MTalerWallet1/Views/Main/WalletEmptyView.swift | 28++++++++++++++--------------
MTalerWallet1/Views/Transactions/ManualDetailsWireV.swift | 4++--
3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift b/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift @@ -172,7 +172,7 @@ struct ManualWithdrawContent: View { } catch { symLog.log(error.localizedDescription) detailsForAmount = nil - } + } return nil } // computeFee diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift b/TalerWallet1/Views/Main/WalletEmptyView.swift @@ -18,10 +18,10 @@ struct WalletEmptyView: View { @EnvironmentObject private var model: WalletModel @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic - @State private var withDrawDisabled = false + @State private var withDrawStarted = false var body: some View { - List { + let list = List { Section { Text("There is no digital cash in your wallet yet.") .talerFont(.title3) @@ -41,30 +41,30 @@ struct WalletEmptyView: View { .listRowSeparator(.hidden) let title = String(localized: "LinkTitle_Test_Money", defaultValue: "Get demo money") Button(title) { - withDrawDisabled = true // don't run twice + withDrawStarted = true // don't run twice Task { // runs on MainActor let amount = Amount(currency: DEMOCURRENCY, cent: 2500) symLog.log("Withdraw KUDOS") try? await model.loadTestKudos(0, amount: amount) } } - .buttonStyle(TalerButtonStyle(type: .prominent, narrow: false, disabled: withDrawDisabled, aligned: .center)) - .disabled(withDrawDisabled) + .buttonStyle(TalerButtonStyle(type: .prominent, narrow: false, disabled: withDrawStarted, aligned: .center)) + .disabled(withDrawStarted) + } + } + .listStyle(myListStyle.style).anyView + .talerFont(.title2) + .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) + ZStack { + list + if withDrawStarted { + RotatingTaler(size: 150, progress: true, rotationEnabled: $withDrawStarted) } } - .listStyle(myListStyle.style).anyView - .talerFont(.title2) - .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) - .overlay(loadingOverlay) .onAppear() { DebugViewC.shared.setViewID(VIEW_EMPTY_WALLET, stack: stack.push("onAppear")) // 10 } } - @ViewBuilder private var loadingOverlay: some View { - if withDrawDisabled { - RotatingTaler(size: 150, progress: true, rotationEnabled: $withDrawDisabled) - } - } } struct WalletEmptyView_Previews: PreviewProvider { diff --git a/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift b/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift @@ -39,8 +39,8 @@ struct TransferRestrictionsV: View { if let restrictions { ForEach(restrictions) { restriction in if let hintsI18 = restriction.human_hint_i18n { - // let sortedDict = OrderedDictionary(uniqueKeys: hintsI18.keys, values: hintsI18.values) - // var sorted: OrderedDictionary<String:String> +// let sortedDict = OrderedDictionary(uniqueKeys: hintsI18.keys, values: hintsI18.values) +// var sorted: OrderedDictionary<String:String> let sortedDict = OrderedDictionary(uncheckedUniqueKeysWithValues: hintsI18.sorted { $0.key < $1.key }) Picker("Restriction:", selection: $selectedLanguage) { ForEach(sortedDict.keys, id: \.self) {