taler-ios

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

commit aeda8be7716fa03b88832d1583f69b3870691d50
parent a39c7b02729ee64fe063020d6934b48ca2927982
Author: Marc Stibane <marc@taler.net>
Date:   Wed, 25 Nov 2026 17:05:25 +0100

fix Products

Diffstat:
MTalerWallet1/Views/Sheets/Payment/ChoicesView.swift | 4++--
MTalerWallet1/Views/Transactions/PaidTransactionDetailV.swift | 15++++-----------
2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift b/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift @@ -185,7 +185,7 @@ struct ProductsView: View, Sendable { var body: some View { if !products.isEmpty { Section { - ForEach(products, id: \.self) { product in + ForEachWithIndex(array: products) { index, product in HStack { VStack(alignment: .leading) { if let name = product.productName { @@ -210,7 +210,7 @@ struct ProductsView: View, Sendable { if let price = product.prices?.first ?? product.price { AmountV(scope, price, isNegative: nil) } - } + }.id(index) .listRowSeparator(.hidden) } } diff --git a/TalerWallet1/Views/Transactions/PaidTransactionDetailV.swift b/TalerWallet1/Views/Transactions/PaidTransactionDetailV.swift @@ -21,6 +21,7 @@ struct PaidTransactionDetailV: View { var body: some View { let common = paymentTx.common + let scope = common.scopes.first let details = paymentTx.details let terms = details.contractTerms let info = details.info @@ -114,17 +115,9 @@ struct PaidTransactionDetailV: View { } } if let products = terms?.products { - if !products.isEmpty { - Section { - ForEach(products) { product in -// if let productId = product.productId { - if let productName = product.productName { - Text(productName) - .talerFont(.body) - } - } - } - } + ProductsView(stack: stack.push(), + scope: scope, + products: products) } } }