commit 25090cfa73f09365706bf6b69a64135b0b799c55
parent d134e59a3bb1843353b45ce6410410a7e94861a6
Author: Marc Stibane <marc@taler.net>
Date: Tue, 22 Jul 2025 09:09:39 +0200
setTarget
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/OIM/OIMcash.swift b/TalerWallet1/Views/OIM/OIMcash.swift
@@ -471,6 +471,19 @@ final class OIMcash: ObservableObject, Sendable {
return initial - interval + (fastAnimations ? 0.1 : 0.2)
}
+ func setTarget(_ target: FundState,
+ _ increasing: Bool = false) {
+ var count = funds.count
+ var index = 0
+ while count > 0 { // for each fund, small to high
+ count -= 1
+ var fund = self.funds[increasing ? index : count]
+ fund.state = target
+ self.updateFund(fund)
+ index += 1
+ }
+ }
+
func interval(count: Int,
duration: TimeInterval,
initial: TimeInterval = 0