commit 8c53a2c5c1bdcdf74b5a018963cbf15b129b4767
parent 2b12e15b7d0bd11becb6a59a7723c7dbdf91f3e3
Author: Marc Stibane <marc@taler.net>
Date: Wed, 18 Nov 2026 12:18:01 +0100
cleanup
Diffstat:
1 file changed, 26 insertions(+), 21 deletions(-)
diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryList.swift b/TalerWallet1/Views/Transactions/TransactionSummaryList.swift
@@ -230,6 +230,30 @@ struct TransactionSummaryList: View {
}
@ViewBuilder
+ func dateSection(_ common: TransactionCommon) -> some View {
+#if DEBUG
+ let background = developerMode ? Color.red : nil
+#else
+ let background: Color? = nil
+#endif
+ Section {
+ HStack {
+ VStack(alignment: .leading) {
+ dateAndStatus(common)
+ .listRowSeparator(.hidden)
+ .talerFont(.title)
+ }
+ if isWorking {
+ RotatingTaler(size: 80, progress: true, once: false,
+ background: background,
+ rotationEnabled: Binding.constant(true))
+ .transition(.opacity.combined(with: .scale))
+ }
+ }
+ }
+ }
+
+ @ViewBuilder
func suspendResume(_ common: TransactionCommon) -> some View {
if talerTX.isSuspendable {
TransactionButton(transactionId: common.transactionId,
@@ -311,11 +335,6 @@ struct TransactionSummaryList: View {
let _ = Self._printChanges()
let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear
#endif
-#if DEBUG
- let background = developerMode ? Color.red : nil
-#else
- let background: Color? = nil
-#endif
let common = talerTX.common
// let scope = common.scopes.first // might be nil if scopes == []
let locale = TalerDater.shared.locale
@@ -326,21 +345,7 @@ struct TransactionSummaryList: View {
let list = List {
if developerMode && withActions { suspendResume(common) }
if !isPayDialog {
- Section {
- HStack {
- VStack(alignment: .leading) {
- dateAndStatus(common)
- .listRowSeparator(.hidden)
- .talerFont(.title)
- }
- if isWorking {
- RotatingTaler(size: 80, progress: true, once: false,
- background: background,
- rotationEnabled: Binding.constant(true))
- .transition(.opacity.combined(with: .scale))
- }
- }
- }
+ dateSection(common)
}
if !controller.stalledConnection {
TransactionTypeDetail(stack: stack.push(),
@@ -505,7 +510,7 @@ struct TransactionSummaryList: View {
.onAppear {
symLog.log("onAppear")
DebugViewC.shared.setViewID(VIEW_TRANSACTIONSUMMARY, stack: stack.push())
- }
+ } // setViewID
.onDisappear {
symLog.log("onDisappear")
}