commit 663d11dcb21dc9912934b18b825feeeacf554275
parent c2df690ff07f79aa595786730aa9edc91e2d5ffe
Author: Marc Stibane <marc@taler.net>
Date: Sat, 22 Aug 2026 10:12:09 +0200
AI: concurrent animations handling / disable invisible
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/TalerWallet1/Views/OIM/OIMbalances.swift b/TalerWallet1/Views/OIM/OIMbalances.swift
@@ -262,6 +262,7 @@ struct OIMbalances: View {
.frame(width: size, height: size)
.zIndex(itsMe ? 3 : 0)
.opacity((isClosed || itsMe) ? 1 : INVISIBLE)
+ .disabled(!(isClosed || itsMe)) // disable invisible
.matchedGeometryEffect(id: itsMe ? OIMNUMBER // (sending ? OIMBACK : OIMNUMBER)
// : String(index),
: oimCurrency.currencyStr,
diff --git a/TalerWallet1/Views/OIM/OIMcash.swift b/TalerWallet1/Views/OIM/OIMcash.swift
@@ -427,6 +427,7 @@ final class OIMcash: ObservableObject, Sendable {
func flyToTarget(target: FundState, index: Int, after delay: TimeInterval) {
let interval = fastAnimations ? 0.2 : 0.4
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
+ guard index < self.funds.count else { return } // funds may have been cleared/mutated meanwhile
var fund = self.funds[index]
withAnimation(.move1) {
fund.state = target
@@ -441,9 +442,8 @@ final class OIMcash: ObservableObject, Sendable {
}
DispatchQueue.main.asyncAfter(deadline: .now() + interval) {
withAnimation(.move1) {
- do {
- self.funds.remove(at: index)
- } catch {}
+ // remove by identity, not by (possibly stale) array index
+ self.removeCash(id: fund.id, value: fund.value)
}
}
}