commit a44254ffe0424c89dceb99875227e0b92becac09
parent 62fbc8147cdb92513491b1347c75af7332b12bb1
Author: Marc Stibane <marc@taler.net>
Date: Sat, 6 Jun 2026 01:09:20 +0200
cleanup
Diffstat:
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift b/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift
@@ -79,7 +79,7 @@ struct P2PReadyV: View {
let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear
#endif
let navTitle = String(localized: "Ready")
- Group {
+ ZStack {
if let transactionId {
TransactionSummaryList(stack: stack.push(),
// scope: scope,
@@ -99,10 +99,9 @@ struct P2PReadyV: View {
LoadingView(stack: stack.push(), scopeInfo: scope, message: message)
.task { await viewDidLoad() }
}
- }
- .onAppear {
+ }.onAppear {
+ symLog.log("onAppear")
DebugViewC.shared.setViewID(VIEW_P2P_READY, stack: stack.push())
-// print("❗️ P2PReadyV onAppear")
}
.onDisappear {
// print("❗️ P2PReadyV onDisappear")
diff --git a/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift b/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift
@@ -43,7 +43,6 @@ struct RotatingTaler: View {
: Text("Taler Logo", comment: "a11y")) // decorative logo - with button function
.rotationEffect(rotationDirection ? Angle(degrees: 0) : Angle(degrees: once ? 900 : 720))
.onReceive(animationTimer) { timerValue in
- print("Timer: \(timerValue), rotationDirection: \(rotationDirection)")
if rotationEnabled {
if !once {
withAnimation(.easeInOut(duration: 1.5)) {
diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift
@@ -146,7 +146,6 @@ struct MainView: View {
.environmentObject(NamespaceWrapper(namespace))
.overlay(alignment: .top) {
DebugViewV()
- .id("ViewID")
} // Show the viewID on top of the app's NavigationView
if (!showScanner && urlToOpen == nil) {
@@ -204,7 +203,7 @@ struct MainView: View {
// show launch animation until either ready or error
switch controller.backendState {
case .ready: mainContent
- case .error: ErrorView(stack.push("mainGroup"),
+ case .error(let error): ErrorView(stack.push("mainGroup"),
title: EMPTYSTRING, // TODO: String(localized: ""),
copyable: true) {}
default: LaunchAnimationView()
@@ -226,7 +225,7 @@ struct MainView: View {
insertion: .move(edge: .top),
removal: .move(edge: .top)
))
- }
+ } // red bar on top
mainGroup
.environmentObject(tabBarModel)
diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift
@@ -133,11 +133,8 @@ struct ThreeAmountsSection: View {
productImages = temp
}
- var body: some View {
- let labelColor = WalletColors().labelColor
- let foreColor = pending ? WalletColors().pendingColor(incoming)
- : WalletColors().transactionColor(incoming)
- let hasNoFees = noFees ?? false
+ @ViewBuilder
+ var productImageSections: some View {
ForEach(productImages, id: \.self) { productImage in
if let image = productImage.image {
Section {
@@ -159,12 +156,19 @@ struct ThreeAmountsSection: View {
}
}
}
+ }
+
+ var body: some View {
+ let labelColor = WalletColors().labelColor
+ let foreColor = pending ? WalletColors().pendingColor(incoming)
+ : WalletColors().transactionColor(incoming)
+ let hasNoFees = noFees ?? false
+ productImageSections
Section {
if let summary {
- if productImages.isEmpty {
- Text(summary)
+ if productImages.isEmpty { // otherwise we already have rendered the images
+ Text(summary) // and thus don't need a summary
.talerFont(.title3)
-// .lineLimit(9) // TODO: remove completely?
.padding(.bottom)
}
}
@@ -219,10 +223,12 @@ struct ThreeAmountsSection: View {
.accessibilityElement(children: .combine)
}
} header: {
- let header = scope?.url?.trimURL ?? scope?.currency ?? "Summary"
- Text(header)
- .talerFont(.title3)
- .foregroundColor(WalletColors().secondary(colorScheme, colorSchemeContrast))
+ let header = scope?.url?.trimURL ?? scope?.currency ?? summary != nil ? "Summary" : nil
+ if let header {
+ Text(header)
+ .talerFont(.title3)
+ .foregroundColor(WalletColors().secondary(colorScheme, colorSchemeContrast))
+ }
}
.task { await viewDidLoad() }
}