taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 62fdfb50db66159837971ac2a16aecc486776748
parent e81152824d17fe3d3c12999a90588fa3bfd21959
Author: Marc Stibane <marc@taler.net>
Date:   Mon, 28 Apr 2025 09:02:31 +0200

debugging

Diffstat:
MTalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift | 7++++++-
MTalerWallet1/Views/OIM/OIMcurrencyButton.swift | 3++-
MTalerWallet1/Views/OIM/OIMcurrencyScroller.swift | 8++++----
3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift @@ -127,11 +127,16 @@ struct SendAmountV: View { .frame(maxWidth: .infinity, alignment: .leading) .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) .task { await viewDidLoad() } - .task(id: taskID) { await newBalance() } + .task(id: taskID) { + let avail = amountAvailable + await newBalance() +// print(">>> SendAmountV.task", taskID, avail, amountAvailable, stack.peek()?.file) + } #if OIM .overlay { if #available(iOS 16.4, *) { if controller.oimModeActive { +// let _ = print(">>> SendAmountV", amountAvailable, amountToTransfer, stack.peek()?.file) let available = !amountAvailable.isZero ? amountAvailable : balance?.available ?? selectedBalance?.available ?? diff --git a/TalerWallet1/Views/OIM/OIMcurrencyButton.swift b/TalerWallet1/Views/OIM/OIMcurrencyButton.swift @@ -150,12 +150,13 @@ struct OIMcurrencyButton: View { : 0.5 // checkDisabled = true // TODO: don't run twice let unavailable = availableVal < value + let disabled = !canEdit || isMorphing || unavailable // cannot edit morphing funds EmptyView().modifier(OIMmod(name: imgName(outValue ?? value), flippedName: imgName(flippedVal), flipTime: flipTime, isFlipped: isFlipped, flipBack: mutating, - disabled: !canEdit || isMorphing || unavailable, // cannot edit morphing funds + disabled: disabled, unavailable: unavailable, invisible: state.hiding, pct: pct, diff --git a/TalerWallet1/Views/OIM/OIMcurrencyScroller.swift b/TalerWallet1/Views/OIM/OIMcurrencyScroller.swift @@ -21,7 +21,7 @@ struct OIMcurrencyScroller: View { var body: some View { var debugTick = 0 - let _ = Self._printChanges() +// let _ = Self._printChanges() let currency = cash.currency let taskID = currency.noteBase + String(scrollPosition) @@ -60,7 +60,7 @@ struct OIMcurrencyScroller: View { } .onAppear { if scrollPosition > 0 { - print(">>> OIMcurrencyScroller.onAppear scrolling to", scrollPosition, canEdit) +// print(">>> OIMcurrencyScroller.onAppear scrolling to", scrollPosition, canEdit) proxy.scrollTo(currency.noteBase + String(-Int(scrollPosition)), anchor: .leading) // DispatchQueue.main.async { // print(">>> OIMcurrencyScroller.onAppear scrolling AGAIN to", scrollPosition, canEdit) @@ -68,13 +68,13 @@ struct OIMcurrencyScroller: View { // } debugTick += 1 } else { // should only happen if available is zero - print("❗️❗️ OIMcurrencyScroller.onAppear scrolling to", scrollPosition, canEdit, stack.peek()?.file) + print("❗️❗️ OIMcurrencyScroller.onAppear scrolling to", scrollPosition, canEdit) // , stack.peek()?.file) } } .task(id: taskID) { if !canEdit && scrollPosition > 0 { debugTick += 1 - print(">>❗️ OIMcurrencyScroller.task", cash.currency.noteBase, availableVal, scrollPosition) +// print(">>❗️ OIMcurrencyScroller.task", cash.currency.noteBase, availableVal, scrollPosition) proxy.scrollTo(currency.noteBase + String(-Int(scrollPosition)), anchor: .leading) debugTick += 1 }