gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 06/16: ViewIDs


From: gnunet
Subject: [taler-taler-ios] 06/16: ViewIDs
Date: Thu, 29 Feb 2024 17:19:13 +0100

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 dbb3a3ea02e285f54053af8e800b4b89947d5c46
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Feb 26 23:03:03 2024 +0100

    ViewIDs
---
 TalerWallet1/Controllers/DebugViewC.swift            | 20 ++++++++++++--------
 TalerWallet1/Views/Banking/ExchangeListView.swift    |  7 +++++--
 TalerWallet1/Views/Banking/ExchangeRowView.swift     |  7 +++++--
 TalerWallet1/Views/Banking/ManualWithdraw.swift      |  9 +++++++--
 TalerWallet1/Views/Main/WalletEmptyView.swift        |  7 +++++--
 TalerWallet1/Views/Sheets/WithdrawExchangeV.swift    |  7 +++++--
 .../Views/Transactions/TransactionsEmptyView.swift   |  7 +++++--
 7 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/TalerWallet1/Controllers/DebugViewC.swift 
b/TalerWallet1/Controllers/DebugViewC.swift
index 0f05cab..8cd8108 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -25,23 +25,24 @@ import os.log
 
 // Numbering Scheme for Views
 // MARK: - Main View
-public let VIEW_EMPTY = 10                                          // 10 
WalletEmptyView
-public let VIEW_BALANCES = VIEW_EMPTY + 1                           // 11 
BalancesListView
-public let VIEW_EXCHANGES = VIEW_BALANCES + 1                       // 12 
ExchangeListView
-public let VIEW_SETTINGS = VIEW_EXCHANGES + 1                       // 13 
SettingsView
+public let VIEW_EMPTY_WALLET = 10                                   // 10 
WalletEmptyView
+public let VIEW_BALANCES = VIEW_EMPTY_WALLET + 1                    // 11 
BalancesListView
+public let VIEW_BANKING = VIEW_BALANCES + 1                         // 12 
ExchangeListView
+public let VIEW_SETTINGS = VIEW_BANKING + 1                         // 13 
SettingsView
 public let VIEW_ABOUT = VIEW_SETTINGS + 1                           // 14 
AboutView
 //public let VIEW_PENDING = VIEW_ABOUT + 1                            // 15 
PendingOpsListView
 
 // MARK: Transactions
-public let VIEW_TRANSACTIONLIST = VIEW_EMPTY + 10                   // 20 
TransactionsListView
-public let VIEW_TRANSACTIONSUMMARY = VIEW_TRANSACTIONLIST + 1       // 21 
TransactionSummary
-public let VIEW_TRANSACTIONDETAIL = VIEW_TRANSACTIONSUMMARY + 1     // 22 
TransactionDetail
+public let VIEW_EMPTY_HISTORY = VIEW_EMPTY_WALLET + 10              // 20 
TransactionsEmptyView
+public let VIEW_TRANSACTIONLIST = VIEW_EMPTY_HISTORY + 1            // 21 
TransactionsListView
+public let VIEW_TRANSACTIONSUMMARY = VIEW_TRANSACTIONLIST + 1       // 22 
TransactionSummary
+public let VIEW_TRANSACTIONDETAIL = VIEW_TRANSACTIONSUMMARY + 1     // 23 
TransactionDetail
 
 
 
 // MARK: - Manual Withdrawal (from Banking / ExchangeList)
 // receive coins from bank ==> shows IBAN + Purpose/Subject for manual wire 
transfer
-public let VIEW_WITHDRAWAL = VIEW_TRANSACTIONLIST + 10              // 30 
WithdrawAmount
+public let VIEW_WITHDRAWAL = VIEW_EMPTY_HISTORY + 10                // 30 
WithdrawAmount
 public let VIEW_WITHDRAW_TOS = VIEW_WITHDRAWAL + 1                  // 31 
WithdrawTOSView
 public let VIEW_WITHDRAW_ACCEPT = VIEW_WITHDRAW_TOS + 1             // 32
 
@@ -77,6 +78,9 @@ public let SHEET_WITHDRAW_TOS = SHEET_WITHDRAWAL + 1          
      // 131 Withd
 public let SHEET_WITHDRAW_ACCEPT = SHEET_WITHDRAW_TOS + 1           // 132 
WithdrawAcceptView
 public let SHEET_WITHDRAW_CONFIRM = SHEET_WITHDRAW_ACCEPT + 1       // 133 
waiting for bank confirmation
 
+public let SHEET_WITHDRAW_EXCHANGE = SHEET_WITHDRAWAL + 5           // 135 
WithdrawExchangeV
+
+
 // MARK: Merchant Payment
 // openURL (Link, NFC or scan QR) ==> pays merchant
 public let SHEET_PAYMENT = SHEET_WITHDRAWAL + 10                    // 140 Pay 
Merchant
diff --git a/TalerWallet1/Views/Banking/ExchangeListView.swift 
b/TalerWallet1/Views/Banking/ExchangeListView.swift
index 7800583..8715568 100644
--- a/TalerWallet1/Views/Banking/ExchangeListView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeListView.swift
@@ -1,7 +1,10 @@
 /*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
  * See LICENSE.md
  */
+/**
+ * @author Marc Stibane
+ */
 import SwiftUI
 import taler_swift
 import SymLog
@@ -109,7 +112,7 @@ extension ExchangeListCommonV: View {
             .listStyle(myListStyle.style).anyView
         }
         .onAppear() {
-            DebugViewC.shared.setViewID(VIEW_EXCHANGES, stack: stack.push())
+            DebugViewC.shared.setViewID(VIEW_BANKING, stack: stack.push())
         }
         .overlay {
             if exchanges.isEmpty {
diff --git a/TalerWallet1/Views/Banking/ExchangeRowView.swift 
b/TalerWallet1/Views/Banking/ExchangeRowView.swift
index d4af147..c147fae 100644
--- a/TalerWallet1/Views/Banking/ExchangeRowView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeRowView.swift
@@ -1,7 +1,10 @@
 /*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
  * See LICENSE.md
  */
+/**
+ * @author Marc Stibane
+ */
 import SwiftUI
 import taler_swift
 import SymLog
@@ -65,7 +68,7 @@ struct ExchangeRowView: View {
               amountToTransfer: $amountToTransfer)
         }
         let manualWithdraw = LazyView {
-            ManualWithdraw(stack: stack.push(),
+            ManualWithdraw(stack: stack.push(), isSheet: false,
                  exchangeBaseUrl: baseURL,
                 amountToTransfer: $amountToTransfer)
         }
diff --git a/TalerWallet1/Views/Banking/ManualWithdraw.swift 
b/TalerWallet1/Views/Banking/ManualWithdraw.swift
index 698bd03..5c7a3d4 100644
--- a/TalerWallet1/Views/Banking/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Banking/ManualWithdraw.swift
@@ -14,6 +14,7 @@ import SymLog
 struct ManualWithdraw: View {
     private let symLog = SymLogV(0)
     let stack: CallStack
+    let isSheet: Bool
     let exchangeBaseUrl: String
     @Binding var amountToTransfer: Amount
 
@@ -91,7 +92,11 @@ struct ManualWithdraw: View {
             
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
             .navigationTitle(navTitle)
             .onAppear {
-                DebugViewC.shared.setViewID(VIEW_WITHDRAWAL, stack: 
stack.push())
+                if isSheet {
+                    DebugViewC.shared.setSheetID(SHEET_WITHDRAW_EXCHANGE)
+                } else {
+                    DebugViewC.shared.setViewID(VIEW_WITHDRAWAL, stack: 
stack.push())
+                }
                 symLog.log("❗️ \(navTitle) onAppear")
             }
             .onDisappear {
@@ -130,7 +135,7 @@ struct ManualWithdraw_Previews: PreviewProvider {
         @State private var amountToPreview = Amount(currency: LONGCURRENCY, 
cent: 510)
 
         var body: some View {
-            ManualWithdraw(stack: CallStack("Preview"),
+            ManualWithdraw(stack: CallStack("Preview"), isSheet: false,
                  exchangeBaseUrl: DEMOEXCHANGE,
                 amountToTransfer: $amountToPreview)
         }
diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift 
b/TalerWallet1/Views/Main/WalletEmptyView.swift
index 1ecb492..c2ea5b6 100644
--- a/TalerWallet1/Views/Main/WalletEmptyView.swift
+++ b/TalerWallet1/Views/Main/WalletEmptyView.swift
@@ -1,7 +1,10 @@
 /*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
  * See LICENSE.md
  */
+/**
+ * @author Marc Stibane
+ */
 import SwiftUI
 import SymLog
 
@@ -34,7 +37,7 @@ struct WalletEmptyView: View {
         .talerFont(.title2)
         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
         .onAppear() {
-            DebugViewC.shared.setViewID(VIEW_EMPTY, stack: 
stack.push("onAppear"))     // 10
+            DebugViewC.shared.setViewID(VIEW_EMPTY_WALLET, stack: 
stack.push("onAppear"))     // 10
         }
     }
 }
diff --git a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift 
b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
index 8859513..eab5268 100644
--- a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
@@ -1,7 +1,10 @@
 /*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
  * See LICENSE.md
  */
+/**
+ * @author Marc Stibane
+ */
 import SwiftUI
 import taler_swift
 import SymLog
@@ -24,7 +27,7 @@ struct WithdrawExchangeV: View {
 #endif
         Group {
             if let exchangeBaseUrl {
-                ManualWithdraw(stack: stack.push(),
+                ManualWithdraw(stack: stack.push(), isSheet: true,
                      exchangeBaseUrl: exchangeBaseUrl,
                     amountToTransfer: $amountToTransfer)
             } else {
diff --git a/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift 
b/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
index e9569d4..cd849ef 100644
--- a/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
@@ -1,7 +1,10 @@
 /*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
  * See LICENSE.md
  */
+/**
+ * @author Marc Stibane
+ */
 import SwiftUI
 import SymLog
 
@@ -26,7 +29,7 @@ struct TransactionsEmptyView: View {
 //        .padding(.vertical)
         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
         .onAppear() {
-            DebugViewC.shared.setViewID(VIEW_EMPTY, stack: stack.push())     
// 10
+            DebugViewC.shared.setViewID(VIEW_EMPTY_HISTORY, stack: 
stack.push())     // 20
         }
     }
 }

-- 
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]