taler-ios

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

commit 298a43b0217c1c775e7ef3380a32ff33c167a8a0
parent c0e8da621faea384b45f194bf151b0b289ee9a5f
Author: Marc Stibane <marc@taler.net>
Date:   Tue,  1 Apr 2025 10:03:49 +0200

cleanup

Diffstat:
MTalerWallet1/Views/Actions/ActionsSheet.swift | 2+-
MTalerWallet1/Views/Main/MainView.swift | 11+++++------
MTalerWallet1/Views/Settings/Exchange/ExchangeListView.swift | 4++--
MTalerWallet1/Views/Sheets/URLSheet.swift | 3++-
4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -18,9 +18,9 @@ struct ActionsSheet: View { let stack: CallStack @Binding var qrButtonTapped: Bool + @EnvironmentObject private var controller: Controller @AppStorage("minimalistic") var minimalistic: Bool = false @AppStorage("demoHints") var demoHints: Bool = true - @EnvironmentObject private var controller: Controller private var hasKudos: Bool { for balance in controller.balances { diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -237,18 +237,17 @@ extension MainView { @Binding var qrButtonTapped: Bool @Binding var userAction: Int + @EnvironmentObject private var controller: Controller + @EnvironmentObject private var model: WalletModel + @EnvironmentObject private var tabBarModel: TabBarModel + @EnvironmentObject private var viewState: ViewState // popToRootView() + @EnvironmentObject private var viewState2: ViewState2 // popToRootView() #if DEBUG @AppStorage("developerMode") var developerMode: Bool = true #else @AppStorage("developerMode") var developerMode: Bool = false #endif @AppStorage("minimalistic") var minimalistic: Bool = false - @EnvironmentObject private var controller: Controller - @EnvironmentObject private var model: WalletModel - @EnvironmentObject private var tabBarModel: TabBarModel - @EnvironmentObject private var viewState: ViewState // popToRootView() - @EnvironmentObject private var viewState2: ViewState2 // popToRootView() - @State private var shouldReloadBalances = 0 @State private var shouldReloadTransactions = 0 diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift b/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift @@ -84,7 +84,7 @@ struct ExchangeListCommonV: View { let _ = Self._printChanges() let _ = symLog?.vlog() // just to get the # to compare it with .onAppear & onDisappear #endif - let sortedList = List(Array(controller.balances.enumerated()), id: \.element) { index, balance in + let balanceList = List(Array(controller.balances.enumerated()), id: \.element) { index, balance in ExchangeSectionView(stack: stack.push(), balance: balance, thousand: index * MAXEXCHANGES) @@ -112,7 +112,7 @@ struct ExchangeListCommonV: View { if controller.balances.isEmpty { emptyList } else { - sortedList + balanceList // sorted by wallet-core } } .listStyle(myListStyle.style).anyView diff --git a/TalerWallet1/Views/Sheets/URLSheet.swift b/TalerWallet1/Views/Sheets/URLSheet.swift @@ -15,8 +15,9 @@ struct URLSheet: View { @Binding var selectedBalance: Balance? @Binding var urlToOpen: URL? - @AppStorage("shouldShowWarning") var shouldShowWarning: Bool = true @EnvironmentObject private var controller: Controller + @AppStorage("shouldShowWarning") var shouldShowWarning: Bool = true + @State private var amountToTransfer = Amount.zero(currency: EMPTYSTRING) @State private var summary = EMPTYSTRING @State private var urlCommand: UrlCommand?