commit 8b270d14a95a6d0f269b7ff5e45d3634c7f54dcd
parent d033fa4e800a84ddd58e00470ec96204448fedd2
Author: Marc Stibane <marc@taler.net>
Date: Wed, 5 Jun 2024 11:53:49 +0200
REFRESHABLE
Diffstat:
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/Balances/BalancesListView.swift b/TalerWallet1/Views/Balances/BalancesListView.swift
@@ -160,6 +160,7 @@ extension BalancesListView {
.listStyle(myListStyle.style).anyView
}
}
+#if REFRESHABLE
.refreshable { // already async
symLog?.log("refreshing balances")
let count = await reloadBalances(stack.push("refreshing balances"), true)
@@ -167,6 +168,7 @@ extension BalancesListView {
NotificationCenter.default.post(name: .BalanceReloaded, object: nil)
}
}
+#endif
} // body
} // Content
}
diff --git a/TalerWallet1/Views/Banking/ExchangeListView.swift b/TalerWallet1/Views/Banking/ExchangeListView.swift
@@ -106,10 +106,12 @@ extension ExchangeListCommonV: View {
// accountHolder: $accountHolder,
amountToTransfer: $amountToTransfer) // does still have the wrong currency
}
+//#if REFRESHABLE
.refreshable {
symLog?.log("refreshing")
await reloadExchanges()
}
+//#endif
.listStyle(myListStyle.style).anyView
}
.onAppear() {
@@ -130,10 +132,12 @@ extension ExchangeListCommonV: View {
.talerFont(.body)
}
}
+//#if REFRESHABLE
.refreshable {
symLog?.log("refreshing")
await reloadExchanges()
}
+//#endif
.listStyle(myListStyle.style).anyView
}
}
diff --git a/TalerWallet1/Views/Transactions/TransactionsListView.swift b/TalerWallet1/Views/Transactions/TransactionsListView.swift
@@ -37,10 +37,12 @@ struct TransactionsListView: View {
}
.id(viewId)
.listStyle(myListStyle.style).anyView
+#if REFRESHABLE
.refreshable {
symLog.log("refreshing")
await reloadAllAction(stack.push())
}
+#endif
.navigationBarItems(trailing: HStack {
if showUpDown {
ArrowUpButton(action: upAction)