commit 52a80b4a7ecdf100bfaf7ee0f5066c78245dc78f parent 7b77bac0ecda7c0cfcb1993d7d83365d702805a6 Author: Marc Stibane <marc@taler.net> Date: Sun, 27 Apr 2025 07:45:37 +0200 16.4 Diffstat:
23 files changed, 33 insertions(+), 49 deletions(-)
diff --git a/TalerWallet1/Controllers/TalerWallet1App.swift b/TalerWallet1/Controllers/TalerWallet1App.swift @@ -71,7 +71,7 @@ struct TalerWallet1App: App { default: break } } -// if #available(iOS 16.0, *) { +// if #available(iOS 16.4, *) { // .backgroundTask(.appRefresh("net.taler.refresh")) { // symLog.log("backgroundTask running") //#if 0 diff --git a/TalerWallet1/Helper/CurrencySpecification.swift b/TalerWallet1/Helper/CurrencySpecification.swift @@ -329,7 +329,7 @@ public class CurrencyFormatter: NumberFormatter { // self.currencyCode = EUR_4217 // self.currencySymbol = "โฌ" self.locale = Locale.autoupdatingCurrent // TODO: Yikes, might override my currency! Needs testing! - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { let currency = self.locale.currency if let currencyCode = currency?.identifier { self.name = self.locale.localizedString(forCurrencyCode: currencyCode) diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift @@ -184,7 +184,7 @@ enum TxAction: String, Codable { return switch self { case .delete: "trash" // ๔ case .suspend: - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { "clock.badge.xmark" // ๔ } else { "clock.badge.exclamationmark" // ๔นถ diff --git a/TalerWallet1/Model/WalletModel.swift b/TalerWallet1/Model/WalletModel.swift @@ -376,7 +376,7 @@ extension WalletModel { } private func dbPath(_ export:Bool = false) throws -> String { - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { let documents = URL.documentsDirectory // accessible by FileSharing let docsPath = documents.path(percentEncoded: false) if export { diff --git a/TalerWallet1/Views/Actions/Banking/DepositAmountV.swift b/TalerWallet1/Views/Actions/Banking/DepositAmountV.swift @@ -105,13 +105,9 @@ struct DepositAmountV: View { } .task(id: balanceIndex + (1000 * controller.currencyTicker)) { await newBalance() } - if #available(iOS 16.0, *) { - if #available(iOS 16.4, *) { - scrollView.toolbar(.hidden, for: .tabBar) - .scrollBounceBehavior(.basedOnSize) - } else { - scrollView.toolbar(.hidden, for: .tabBar) - } + if #available(iOS 16.4, *) { + scrollView.toolbar(.hidden, for: .tabBar) + .scrollBounceBehavior(.basedOnSize) } else { scrollView } diff --git a/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift b/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift @@ -116,13 +116,9 @@ struct ManualWithdraw: View { } } - if #available(iOS 16.0, *) { - if #available(iOS 16.4, *) { - scrollView.toolbar(.hidden, for: .tabBar) - .scrollBounceBehavior(.basedOnSize) - } else { - scrollView.toolbar(.hidden, for: .tabBar) - } + if #available(iOS 16.4, *) { + scrollView.toolbar(.hidden, for: .tabBar) + .scrollBounceBehavior(.basedOnSize) } else { scrollView } diff --git a/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift b/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift @@ -111,7 +111,7 @@ struct P2PSubjectV: View { .accessibilityHidden(true) .padding(.top) } - Group { if #available(iOS 16.0, *) { + Group { if #available(iOS 16.4, *) { TextField(placeHolder, text: $summary, axis: .vertical) } else { TextField(placeHolder, text: $summary) diff --git a/TalerWallet1/Views/Actions/Peer2peer/RequestPayment.swift b/TalerWallet1/Views/Actions/Peer2peer/RequestPayment.swift @@ -90,13 +90,9 @@ struct RequestPayment: View { .task { await viewDidLoad() } .task(id: balanceIndex + (1000 * controller.currencyTicker)) { await newBalance() } - if #available(iOS 16.0, *) { - if #available(iOS 16.4, *) { - scrollView.toolbar(.hidden, for: .tabBar) - .scrollBounceBehavior(.basedOnSize) - } else { - scrollView.toolbar(.hidden, for: .tabBar) - } + if #available(iOS 16.4, *) { + scrollView.toolbar(.hidden, for: .tabBar) + .scrollBounceBehavior(.basedOnSize) } else { scrollView } diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift @@ -116,13 +116,9 @@ struct SendAmountV: View { } } #endif - if #available(iOS 16.0, *) { - if #available(iOS 16.4, *) { - scrollView.toolbar(.hidden, for: .tabBar) - .scrollBounceBehavior(.basedOnSize) - } else { - scrollView.toolbar(.hidden, for: .tabBar) - } + if #available(iOS 16.4, *) { + scrollView.toolbar(.hidden, for: .tabBar) + .scrollBounceBehavior(.basedOnSize) } else { scrollView } diff --git a/TalerWallet1/Views/Actions/TwoRowButtons.swift b/TalerWallet1/Views/Actions/TwoRowButtons.swift @@ -80,7 +80,7 @@ struct TypeButton: View { if minimalistic { badge } else { - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { hLayout vLayout @@ -141,7 +141,7 @@ struct TwoRowButtons: View { recvButton(recvTitle.tabbed(oneLine: true)) } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { hLayout // .border(.green) diff --git a/TalerWallet1/Views/Balances/BalanceCellV.swift b/TalerWallet1/Views/Balances/BalanceCellV.swift @@ -64,7 +64,7 @@ struct BalanceCellV: View { hLayout } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { HStack(spacing: HSPACING) { balanceText diff --git a/TalerWallet1/Views/Balances/PendingRowView.swift b/TalerWallet1/Views/Balances/PendingRowView.swift @@ -49,7 +49,7 @@ struct PendingRowView: View { } } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { HStack { iconBadge diff --git a/TalerWallet1/Views/HelperViews/AmountRowV.swift b/TalerWallet1/Views/HelperViews/AmountRowV.swift @@ -37,7 +37,7 @@ struct AmountRowV: View { } } Group { - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { HStack(alignment: .lastTextBaseline) { titleV//.border(.orange) diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift @@ -167,7 +167,7 @@ struct CurrencyInputView: View { useShortcut = 0 } } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { let shortcuts = shortcuts(currencyField) ViewThatFits(in: .horizontal) { HStack { diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift @@ -59,7 +59,7 @@ struct QRCodeDetailView: View { if talerURI.count > 10 { Section { Group { -// if #available(iOS 16.0, *) { +// if #available(iOS 16.4, *) { // let screenWidth = UIScreen.screenWidth // GradientBorder(size: screenWidth/1.8, // color: .accentColor, diff --git a/TalerWallet1/Views/HelperViews/ScopePicker.swift b/TalerWallet1/Views/HelperViews/ScopePicker.swift @@ -55,7 +55,7 @@ struct ScopePicker: View { .accessibilityHidden(true) .foregroundColor(disabled ? .secondary : .primary) - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ScopeDropDown(selection: $selected, onlyNonZero: onlyNonZero, disabled: disabled) @@ -92,7 +92,7 @@ struct ScopePicker: View { } } // MARK: - -@available(iOS 16.0, *) +@available(iOS 16.4, *) struct ScopeDropDown: View { @Binding var selection: Int let onlyNonZero: Bool diff --git a/TalerWallet1/Views/HelperViews/SubjectInputV.swift b/TalerWallet1/Views/HelperViews/SubjectInputV.swift @@ -60,7 +60,7 @@ struct SubjectInputV<TargetView: View>: View { .accessibilityRemoveTraits(.isStaticText) .padding(.top) } - Group { if #available(iOS 16.0, *) { + Group { if #available(iOS 16.4, *) { TextField(minimalistic ? "Subject" : EMPTYSTRING, text: $summary, axis: .vertical) .focused($isFocused) .lineLimit(2...) diff --git a/TalerWallet1/Views/OIM/OIMlineViews.swift b/TalerWallet1/Views/OIM/OIMlineViews.swift @@ -153,7 +153,7 @@ struct OIMlineView: View { #endif } } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { Group { if false { scrollView diff --git a/TalerWallet1/Views/Settings/Bank/BankSectionView.swift b/TalerWallet1/Views/Settings/Bank/BankSectionView.swift @@ -136,7 +136,7 @@ struct BankSectionRow: View { if minimalistic { Text(value) - } else if #available(iOS 16.0, *) { + } else if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { hLayout vLayout diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift b/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift @@ -41,7 +41,7 @@ struct ExchangeListView: View { let addTitleStr = String(localized: "Add payment service", comment: "title of the addExchange alert") let addButtonStr = String(localized: "Add", comment: "button in the addExchange alert") let enterURL = String(localized: "Enter the URL") - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ExchangeListCommonV(symLog: symLog, stack: stack.push()) .navigationTitle(navTitle) .navigationBarItems(trailing: plusButton) diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift @@ -252,7 +252,7 @@ struct PaymentView: View, Sendable { text .contentTransition(.numericText(countsDown: true)) .animation(.default, value: elapsed) - } else if #available(iOS 16.0, *) { + } else if #available(iOS 16.4, *) { text .animation(.default, value: elapsed) } else { diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift @@ -177,7 +177,7 @@ struct TransactionRowView: View { #if DEBUG .border(blue) #endif - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { layout1 #if DEBUG diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -171,7 +171,7 @@ struct TransactionSummaryV: View { statusT .frame(maxWidth: .infinity, alignment: .trailing) } - if #available(iOS 16.0, *) { + if #available(iOS 16.4, *) { ViewThatFits(in: .horizontal) { HStack(spacing: HSPACING) { imageT