taler-ios

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

commit fefe8cce0d2dfd552aa79a1fe41b7d78efb87d86
parent e550f13998aa08598c520b4651993b76ed108f01
Author: Marc Stibane <marc@taler.net>
Date:   Sun, 15 Feb 2026 08:01:33 +0100

cleanup

Diffstat:
MTalerWallet1/Helper/CallStack.swift | 2+-
MTalerWallet1/Views/Actions/ActionsSheet.swift | 6+++---
MTalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift | 6+++---
MTalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift | 4++--
MTalerWallet1/Views/Balances/BalanceCellV.swift | 4++--
MTalerWallet1/Views/HelperViews/AmountV.swift | 4++--
MTalerWallet1/Views/HelperViews/ListStyle.swift | 4++--
MTalerWallet1/Views/HelperViews/ScopePicker.swift | 3++-
MTalerWallet1/Views/Main/MainView.swift | 7+------
MTalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift | 5++---
MTalerWallet1/Views/Sheets/Payment/PaymentDone.swift | 4++--
11 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/TalerWallet1/Helper/CallStack.swift b/TalerWallet1/Helper/CallStack.swift @@ -1,5 +1,5 @@ // MIT License -// Copyright © 2018-2023 Marc Stibane +// Copyright © 2018-2026 Marc Stibane // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software // and associated documentation files (the "Software"), to deal in the Software without restriction, diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -164,8 +164,7 @@ struct DualHeightSheet: View { let scanDetent: PresentationDetent = .fraction(SCANDETENT) // @State private var selectedDetent: PresentationDetent = scanDetent // Cannot use instance member 'scanDetent' within property initializer @State private var selectedDetent: PresentationDetent = .fraction(0.1) // workaround - update in .task -// @State private var detents: Set<PresentationDetent> = [scanDetent] - @State private var detents: Set<PresentationDetent> = [.fraction(0.1)] + @State private var detents: Set<PresentationDetent> = [.fraction(0.1)] // " @State private var qrButtonTapped2: Bool = false @State private var innerHeight: CGFloat = .zero @State private var sheetHeight: CGFloat = .zero @@ -176,6 +175,7 @@ struct DualHeightSheet: View { try? await Task.sleep(nanoseconds: 80_000_000) guard selectedDetent == scanDetent else { return } detents = [scanDetent] + logger.trace("❗️detents = [scanDetent]") // 0.999 % } } diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -9,7 +9,7 @@ import SwiftUI import taler_swift import SymLog -// Called when tapping [􁉇Send] +// Called by MainContent when tapping [􁉇Send] struct SendAmountV: View { private let symLog = SymLogV(0) let stack: CallStack @@ -108,7 +108,7 @@ struct SendAmountV: View { let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear #endif let currencySymbol = currencyInfo.symbol - let navA11y = SendAmountView.navTitle(currencyInfo.name) // always include currency for a11y + let navA11y = SendAmountView.navTitle(currencyInfo.name, true) // always include currency for a11y let navTitle = SendAmountView.navTitle(currencySymbol, currencyInfo.hasSymbol) let count = controller.balances.count let _ = symLog.log("count = \(count)") diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -9,7 +9,7 @@ import SwiftUI import taler_swift import SymLog -// Called when tapping [􁉇Send] +// Called by SendAmountV when tapping [􁉇Send] struct SendAmountView: View { private let symLog = SymLogV(0) let stack: CallStack diff --git a/TalerWallet1/Views/Balances/BalanceCellV.swift b/TalerWallet1/Views/Balances/BalanceCellV.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -57,7 +57,7 @@ struct BalanceCellV: View { let hLayout = HStack { amountV .frame(maxWidth: .infinity, alignment: .trailing) - Text(Image(systemName: "chevron.right")) + Text(Image(systemName: "chevron.forward")) .talerFont(.table) .foregroundColor(.secondary) } diff --git a/TalerWallet1/Views/HelperViews/AmountV.swift b/TalerWallet1/Views/HelperViews/AmountV.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -12,7 +12,7 @@ struct AmountV: View { let stack: CallStack? let scope: ScopeInfo? let amount: Amount - let isNegative: Bool? // if true, show a "-" before the amount + let isNegative: Bool? // show a "-" or "+" before the amount, nothing for nil let useISO: Bool let strikethrough: Bool let large: Bool // set to false for QR or IBAN diff --git a/TalerWallet1/Views/HelperViews/ListStyle.swift b/TalerWallet1/Views/HelperViews/ListStyle.swift @@ -60,8 +60,8 @@ struct AnyViewDemo: View { @State private var selectedStyle = MyListStyle.automatic let sections = ["Breakfast" : ["pancakes", "bacon", "orange juice"], - "Lunch" : ["sandwich", "chips", "lemonade"], - "Dinner" : ["spaghetti", "bread", "water"]] + "Lunch" : ["sandwich", "chips", "lemonade"], + "Dinner" : ["spaghetti", "bread", "water"]] var body: some View { diff --git a/TalerWallet1/Views/HelperViews/ScopePicker.swift b/TalerWallet1/Views/HelperViews/ScopePicker.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -84,6 +84,7 @@ struct ScopePicker: View { // .accessibilityLabel(a11yLabel) .accessibilityHint(disabled ? EMPTYSTRING : chooseHint) .task() { + // FIXME: check balance for non-zero and disable-peer-payments withAnimation { selected = value } } .onChange(of: selected) { newValue in diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -53,11 +53,6 @@ struct MainView: View { ViewState.shared.popToRootView(nil) } - private func dismissingSheet() { -// if #available(iOS 17.0, *) { -// AccessibilityNotification.Announcement(ClosingAnnouncement).post() -// } - } private func dismissSheet() { showScanner = false showActionSheet = false diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift b/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -30,7 +30,7 @@ struct ExchangeRowView: View { let delay: UInt = 0 #endif let baseURL = exchange.exchangeBaseUrl - let chevron = Text(Image(systemName: "chevron.right")) + let chevron = Text(Image(systemName: "chevron.forward")) .talerFont(.table) .foregroundColor(.secondary) @@ -39,7 +39,6 @@ struct ExchangeRowView: View { Spacer() chevron } - let rowView = VStack(alignment: .leading) { Text(baseURL.trimURL) .talerFont(.headline) diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift b/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -44,7 +44,7 @@ struct PaymentDone: View { // scope: scope, transactionId: transactionId, talerTX: $talerTX, - navTitle: navTitle, + navTitle: navTitle, // TODO: nil so navTitle2 is used hasDone: true, abortAction: nil, deleteAction: nil,