taler-ios

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

commit d1d405ca16801ad06c10ff4bd32765b2edd899ca
parent 0eb98d364fbb8046edc6954598c162b7e45e63c8
Author: Marc Stibane <marc@taler.net>
Date:   Mon,  8 Apr 2024 16:10:48 +0200

includeRefreshes: developerMode

Diffstat:
MTalerWallet1/Views/Balances/BalancesSectionView.swift | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift b/TalerWallet1/Views/Balances/BalancesSectionView.swift @@ -27,6 +27,11 @@ struct BalancesSectionView { @Environment(\.colorScheme) private var colorScheme @Environment(\.colorSchemeContrast) private var colorSchemeContrast @EnvironmentObject private var controller: Controller +#if DEBUG + @AppStorage("developerMode") var developerMode: Bool = true +#else + @AppStorage("developerMode") var developerMode: Bool = false +#endif @AppStorage("minimalistic") var minimalistic: Bool = false @State private var showSpendingHint = true @@ -43,12 +48,12 @@ struct BalancesSectionView { @State private var shownSectionID = UUID() // guaranteed to be different the first time func reloadCompleted(_ stack: CallStack) async -> () { - transactions = await model.transactionsT(stack.push(), scopeInfo: balance.scopeInfo, includeRefreshes: true) + transactions = await model.transactionsT(stack.push(), scopeInfo: balance.scopeInfo, includeRefreshes: developerMode) completedTransactions = WalletModel.completedTransactions(transactions) } func reloadPending(_ stack: CallStack) async -> () { - transactions = await model.transactionsT(stack.push(), scopeInfo: balance.scopeInfo, includeRefreshes: true) + transactions = await model.transactionsT(stack.push(), scopeInfo: balance.scopeInfo, includeRefreshes: developerMode) pendingTransactions = WalletModel.pendingTransactions(transactions) } } @@ -123,7 +128,7 @@ extension BalancesSectionView: View { // if shownSectionID != sectionID { symLog.log(".task for BalancesSectionView - reload Transactions") // TODO: only load the MAXRECENT most recent transactions - let response = await model.transactionsT(stack.push(".task - reload Transactions"), scopeInfo: scopeInfo, includeRefreshes: true) + let response = await model.transactionsT(stack.push(".task - reload Transactions"), scopeInfo: scopeInfo, includeRefreshes: developerMode) transactions = response pendingTransactions = WalletModel.pendingTransactions(response) completedTransactions = WalletModel.completedTransactions(response)