taler-ios

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

commit 8962b853d1ed19f0b619af4e167241d2783222ec
parent a86f7aed93c8c3a0b02942a1552edaded0b4472b
Author: Marc Stibane <marc@taler.net>
Date:   Sun, 15 Feb 2026 10:08:15 +0100

Fix (Swiss) QR code sharing

Diffstat:
MTalerWallet1/Views/Transactions/ManualDetailsV.swift | 9+++++++--
MTalerWallet1/Views/Transactions/QRcodesForPayto.swift | 13++++++++++---
2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift b/TalerWallet1/Views/Transactions/ManualDetailsV.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -101,7 +101,12 @@ struct ManualDetailsV: View { } if qrCodeSpecs.count > 0 { - let qrCodesForPayto = QRcodesForPayto(stack: stack.push(), qrCodeSpecs: $qrCodeSpecs) + let qrCodesForPayto = QRcodesForPayto(stack: stack.push(), + qrCodeSpecs: $qrCodeSpecs, + receiverStr: receiverStr, + amountStr: amountStr.0, + messageStr: payto.messageStr + ) NavigationLink(destination: qrCodesForPayto) { Text(minimalistic ? "QR" : "Wire transfer QR codes") diff --git a/TalerWallet1/Views/Transactions/QRcodesForPayto.swift b/TalerWallet1/Views/Transactions/QRcodesForPayto.swift @@ -1,5 +1,5 @@ /* - * This file is part of GNU Taler, ©2022-25 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-26 Taler Systems S.A. * See LICENSE.md */ /** @@ -11,6 +11,7 @@ import taler_swift struct QRcodeCopyShare: View { let spec: QrCodeSpec + let textToShare: String @State private var qrImage: UIImage? = nil @@ -26,7 +27,7 @@ struct QRcodeCopyShare: View { .accessibilityHidden(true) .foregroundColor(Color.clear) // Spacer() - CopyShare(textToCopy: spec.qrContent, image: qrImage) + CopyShare(textToCopy: textToShare, image: qrImage) .disabled(false) }.listRowSeparator(.automatic) } @@ -35,18 +36,24 @@ struct QRcodeCopyShare: View { struct QRcodesForPayto: View { let stack: CallStack @Binding var qrCodeSpecs: [QrCodeSpec] + let receiverStr: String + let amountStr: String + let messageStr: String? + let navTitle = String(localized: "Wire transfer", comment: "ViewTitle of wire-transfer QR codes") @AppStorage("minimalistic") var minimalistic: Bool = false var body: some View { + let message = messageStr ?? EMPTYSTRING + let textToShare = String(receiverStr + "\n" + amountStr + "\n" + message) List { if !minimalistic { Text("If your banking software runs on another device, you can scan one of these QR codes:") .listRowSeparator(.hidden) } ForEach(qrCodeSpecs, id: \.self) { spec in - QRcodeCopyShare(spec: spec) + QRcodeCopyShare(spec: spec, textToShare: textToShare) } } .navigationTitle(navTitle)