gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 13/20: CopyShare for QR, with separate content


From: gnunet
Subject: [taler-taler-ios] 13/20: CopyShare for QR, with separate content
Date: Fri, 02 Aug 2024 18:04:07 +0200

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 0cddeb6e08da42bae1b9f9c027a613e3ca174852
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Aug 2 15:25:03 2024 +0200

    CopyShare for QR, with separate content
---
 TalerWallet1/Views/HelperViews/QRCodeDetailView.swift     | 7 ++++---
 TalerWallet1/Views/Peer2peer/SendAmount.swift             | 7 ++++---
 TalerWallet1/Views/Transactions/ManualDetailsV.swift      | 3 +++
 TalerWallet1/Views/Transactions/TransactionDetailV.swift  | 2 +-
 TalerWallet1/Views/Transactions/TransactionSummaryV.swift | 3 ++-
 5 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift 
b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
index 283fcee..771936c 100644
--- a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
+++ b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
@@ -12,6 +12,7 @@ import AVFoundation
 
 struct QRCodeDetailView: View {
     let talerURI: String
+    let talerCopyShare: String
     let incoming: Bool
     let amount: Amount
 
@@ -36,7 +37,7 @@ struct QRCodeDetailView: View {
                     .talerFont(.title3)
 //                    .padding(.vertical)
                     .listRowSeparator(.hidden)
-                CopyShare(textToCopy: talerURI)
+                CopyShare(textToCopy: talerCopyShare)
                     .disabled(false)
 //                    .padding(.bottom)
                     .listRowSeparator(.hidden)
@@ -87,12 +88,12 @@ struct QRCodeDetailView: View {
 // MARK: -
 #if DEBUG
 fileprivate struct ContentView: View {
-    @State var talerURI: String = 
"taler://pay-push/exchange.demo.taler.net/95ZG4D1AGFGZQ7CNQ1V49D3FT18HXKA6HQT4X3XME9YSJQVFQ520"
+    @State var previewURI: String = 
"taler://pay-push/exchange.demo.taler.net/95ZG4D1AGFGZQ7CNQ1V49D3FT18HXKA6HQT4X3XME9YSJQVFQ520"
 
     var body: some View {
         let amount = Amount(currency: LONGCURRENCY, cent: 123)
         List {
-            QRCodeDetailView(talerURI: talerURI, incoming: false, amount: 
amount)
+            QRCodeDetailView(talerURI: previewURI, talerCopyShare: previewURI, 
incoming: false, amount: amount)
         }
     }
 }
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift 
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index a2ed74f..f700695 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -86,15 +86,16 @@ struct SendAmount: View {
                 peerPushCheck = ppCheck
                 let feeLabel = feeLabel(feeStr)
 //                announce("\(amountVoiceOver), \(feeLabel)")
-                return ComputeFeeResult(insufficient: insufficient, feeAmount: 
fee,
-                                        feeStr: feeLabel, numCoins: nil)
+                return ComputeFeeResult(insufficient: insufficient,
+                                           feeAmount: fee,
+                                              feeStr: feeLabel,
+                                            numCoins: nil)
             } else {
                 peerPushCheck = nil
             }
         } catch {
             // handle cancel, errors
             symLog.log("❗️ \(error)")
-
         }
         return nil
     }
diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift 
b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
index c33c3b6..12d78ff 100644
--- a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
+++ b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
@@ -209,6 +209,9 @@ struct ManualDetailsV: View {
                                 .frame(maxWidth: .infinity, alignment: .center)
                                 .accessibilityLabel("QR Code")
                                 .listRowSeparator(.hidden)
+                            CopyShare(textToCopy: spec.qrContent)
+                                .disabled(false)
+//                    .padding(.bottom)
 
 //                            Text(specDetails)
 //                                .listRowSeparator(.automatic)
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailV.swift 
b/TalerWallet1/Views/Transactions/TransactionDetailV.swift
index 535dd6a..2b87b33 100755
--- a/TalerWallet1/Views/Transactions/TransactionDetailV.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailV.swift
@@ -18,7 +18,7 @@ struct TransactionDetailV: View {
         let info = details.info
         Section {
             if let posConfirmation = details.posConfirmation {
-                Text("Confirmation:")
+                Text("Confirmation:", comment: "purchase may have a pos 
validation / confirmation")
                     .talerFont(.title3)
                     .listRowSeparator(.hidden)
                 Text(posConfirmation)
diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift 
b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
index 5875a1b..0df1f6c 100755
--- a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
+++ b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
@@ -494,6 +494,7 @@ struct TransactionSummaryV: View {
                 if let talerURI = details[TALERURI] {
                     if talerURI.count > 10 {
                         QRCodeDetailView(talerURI: talerURI,
+                                   talerCopyShare: talerURI,
                                          incoming: transaction.isP2pIncoming,
                                            amount: 
transaction.common.amountRaw)
                     }
@@ -507,7 +508,7 @@ struct TransactionSummaryV: View {
             }
         }
     }
-}
+} // TransactionSummaryV
 // MARK: -
 #if DEBUG
 //struct TransactionSummary_Previews: PreviewProvider {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]