commit a46d3990e20b8ae722dc2194f6b94a4d3a1f9c7b
parent 8e7c160c1ec97bcee238776603e08c983920fd5e
Author: Marc Stibane <marc@taler.net>
Date: Sat, 12 Oct 2024 16:19:36 +0200
pull-to-refresh haptics
Diffstat:
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/Balances/BalancesListView.swift b/TalerWallet1/Views/Balances/BalancesListView.swift
@@ -74,6 +74,7 @@ struct BalancesListView: View {
}
#if REFRESHABLE
.refreshable { // already async
+ controller.hapticNotification(.success)
symLog.log("refreshing balances")
let count = await reloadBalances(stack.push("refreshing balances"), true)
if let count, count > 0 {
diff --git a/TalerWallet1/Views/Banking/ExchangeListView.swift b/TalerWallet1/Views/Banking/ExchangeListView.swift
@@ -131,6 +131,7 @@ extension ExchangeListCommonV: View {
.listStyle(myListStyle.style).anyView
//#if REFRESHABLE
.refreshable {
+ controller.hapticNotification(.success)
symLog?.log("refreshing")
await reloadExchanges()
}
diff --git a/TalerWallet1/Views/Transactions/TransactionsListView.swift b/TalerWallet1/Views/Transactions/TransactionsListView.swift
@@ -27,6 +27,7 @@ struct TransactionsListView: View {
let reloadAllAction: (_ stack: CallStack) async -> ()
let reloadOneAction: ((_ transactionId: String, _ viewHandles: Bool) async throws -> Transaction)
+ @EnvironmentObject private var controller: Controller
@AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
@State private var viewId = UUID()
@@ -51,6 +52,7 @@ struct TransactionsListView: View {
.listStyle(myListStyle.style).anyView
#if REFRESHABLE
.refreshable {
+ controller.hapticNotification(.success)
symLog.log("refreshing")
await reloadAllAction(stack.push())
}