taler-ios

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

commit fb0e00bd2a2719c828277645273e274d64e714f1
parent 89101c451342348e7c1579c114458d76c952c02d
Author: Marc Stibane <marc@taler.net>
Date:   Sun, 13 Apr 2025 14:08:37 +0200

use cash

Diffstat:
MTalerWallet1/Views/OIM/OIMView.swift | 9+++------
MTalerWallet1/Views/OIM/OIMlineViews.swift | 5+++--
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/TalerWallet1/Views/OIM/OIMView.swift b/TalerWallet1/Views/OIM/OIMView.swift @@ -87,8 +87,7 @@ struct OIMView: View { OIMbackground(amount: amount, currencyName: currency.noteBase) { VStack { Spacer() - OIMlineView(stack: stack.push(), - currency: currency, + OIMlineViews(stack: stack.push(), amountVal: $amountVal, tappedVal: tappedVal, flying: $flying, @@ -126,8 +125,7 @@ struct OIMPayView: View { OIMbackground(amount: amount, currencyName: currency.noteBase) { VStack { Spacer() - OIMlineView(stack: stack.push(), - currency: currency, + OIMlineViews(stack: stack.push(), amountVal: $amountVal, tappedVal: tappedVal, flying: $flying, @@ -188,8 +186,7 @@ struct OIMEditView: View { ZStack { // without this, money would fly below the scroller VStack { // even though this is the only item in the ZStack Spacer() - OIMlineView(stack: stack.push(), - currency: currency, + OIMlineViews(stack: stack.push(), amountVal: $amountVal, tappedVal: tappedVal, flying: $flying, diff --git a/TalerWallet1/Views/OIM/OIMlineViews.swift b/TalerWallet1/Views/OIM/OIMlineViews.swift @@ -49,15 +49,15 @@ struct OIMnotesView1: View { fileprivate let horzSpacing: CGFloat = 20 fileprivate let vertSpacing: CGFloat = 10 -struct OIMlineView: View { +struct OIMlineViews: View { let stack: CallStack - let currency: OIMcurrency @Binding var amountVal: UInt64 let tappedVal: UInt64 @Binding var flying: UInt64 let shake: Bool let canEdit: Bool + @EnvironmentObject private var cash: OIMcash @EnvironmentObject private var wrapper: NamespaceWrapper @AppStorage("oimTwoRows") var oimTwoRows: Bool = false @@ -70,6 +70,7 @@ struct OIMlineView: View { let blue = debug ? Color.blue : Color.clear let orange = debug ? Color.orange : Color.clear #endif + let currency = cash.currency let result = currency.notesCoins(amountVal) // Text("notes: \(result.0), coins: \(result.1)") let notes = OIMnotesView1(stack: stack.push(),