gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 06/32: Cleanup, logging


From: gnunet
Subject: [taler-taler-ios] 06/32: Cleanup, logging
Date: Sat, 10 Feb 2024 15:04:32 +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 c26d217ba97bed51f320b376e3dd45bae17209f5
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Jan 28 14:48:38 2024 +0100

    Cleanup, logging
---
 TalerWallet1/Backend/WalletCore.swift              |  2 +-
 TalerWallet1/Views/Banking/ManualWithdraw.swift    |  1 +
 TalerWallet1/Views/HelperViews/Buttons.swift       | 44 ++++++++++++----------
 TalerWallet1/Views/Peer2peer/P2PSubjectV.swift     |  1 +
 TalerWallet1/Views/Peer2peer/RequestPayment.swift  |  1 +
 TalerWallet1/Views/Peer2peer/SendAmount.swift      |  1 +
 .../Sheets/P2P_Sheets/P2pReceiveURIView.swift      |  2 +-
 .../Views/Transactions/ManualDetailsV.swift        |  1 +
 8 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift 
b/TalerWallet1/Backend/WalletCore.swift
index f081aac..d251897 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -388,7 +388,7 @@ extension WalletCore {
             sendRequest(request: reqData) { requestId, timeSent, result, error 
in
                 let timeUsed = Date.now - timeSent
                 let millisecs = timeUsed.milliseconds
-                self.logger.info("Request \(requestId, privacy: .public) took 
\(millisecs, privacy: .public) ms")
+                self.logger.info("Request \"id\":\(requestId, privacy: 
.public) took \(millisecs, privacy: .public) ms")
                 var err: Error? = nil
                 if let json = result {
                     do {
diff --git a/TalerWallet1/Views/Banking/ManualWithdraw.swift 
b/TalerWallet1/Views/Banking/ManualWithdraw.swift
index f63751e..974a51c 100644
--- a/TalerWallet1/Views/Banking/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Banking/ManualWithdraw.swift
@@ -81,6 +81,7 @@ struct ManualWithdraw: View {
                 }
             } } // ScrollVStack
             .frame(maxWidth: .infinity, alignment: .leading)
+//            .scrollBounceBehavior(.basedOnSize)  needs iOS 16.4
             .padding(.horizontal)
             
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
             .navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift 
b/TalerWallet1/Views/HelperViews/Buttons.swift
index 7d9a788..5ef89ab 100644
--- a/TalerWallet1/Views/HelperViews/Buttons.swift
+++ b/TalerWallet1/Views/HelperViews/Buttons.swift
@@ -108,31 +108,35 @@ struct TalerButtonStyle: ButtonStyle {
     var badge: String = EMPTYSTRING
 
     public func makeBody(configuration: ButtonStyle.Configuration) -> some 
View {
-//        configuration.role = type == .prominent ? .primary : .normal         
 Only on macOS
-            MyBigButton(//type: type,
-                   foreColor: foreColor(type: type, pressed: 
configuration.isPressed, disabled: disabled),
-                   backColor: backColor(type: type, pressed: 
configuration.isPressed, disabled: disabled),
-                      dimmed: dimmed,
-               configuration: configuration,
-                    disabled: disabled,
-                      narrow: narrow,
-                     aligned: aligned,
-                       badge: badge)
+        //        configuration.role = type == .prominent ? .primary : .normal 
         Only on macOS
+        MyBigButton(//type: type,
+            foreColor: foreColor(type: type, pressed: configuration.isPressed, 
disabled: disabled),
+            backColor: backColor(type: type, pressed: configuration.isPressed, 
disabled: disabled),
+            dimmed: dimmed,
+            configuration: configuration,
+            disabled: disabled,
+            narrow: narrow,
+            aligned: aligned,
+            badge: badge)
     }
 
     func foreColor(type: TalerButtonStyleType, pressed: Bool, disabled: Bool) 
-> Color {
-        return type == .plain ? WalletColors().fieldForeground :      // 
primary text color
-            WalletColors().buttonForeColor(pressed: pressed,
-                                          disabled: disabled,
-                                         prominent: type == .prominent,
-                                           balance: type == .balance)
+        if type == .plain {
+            return WalletColors().fieldForeground      // primary text color
+        }
+        return WalletColors().buttonForeColor(pressed: pressed,
+                                             disabled: disabled,
+                                            prominent: type == .prominent,
+                                              balance: type == .balance)
     }
     func backColor(type: TalerButtonStyleType, pressed: Bool, disabled: Bool) 
-> Color {
-        return type == .plain && !pressed ? Color.clear :
-            WalletColors().buttonBackColor(pressed: pressed,
-                                          disabled: disabled,
-                                         prominent: type == .prominent,
-                                           balance: type == .balance)
+        if type == .plain && !pressed {
+            return Color.clear
+        }
+        return WalletColors().buttonBackColor(pressed: pressed,
+                                             disabled: disabled,
+                                            prominent: type == .prominent,
+                                              balance: type == .balance)
     }
 
     struct BackgroundView: View {
diff --git a/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift 
b/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
index 4ee9f03..ecc5116 100644
--- a/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
+++ b/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
@@ -119,6 +119,7 @@ struct P2PSubjectV: View {
                 .disabled(disabled)
                 .accessibilityHint(disabled ? "enabled when subject and 
expiration are set" : EMPTYSTRING)
         }.padding(.horizontal) } // ScrollVStack
+//        .scrollBounceBehavior(.basedOnSize)  needs iOS 16.4
         .navigationTitle(subjectTitle(amountToTransfer, currencyInfo))
         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
         .onAppear {
diff --git a/TalerWallet1/Views/Peer2peer/RequestPayment.swift 
b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
index 5de2e1d..189c861 100644
--- a/TalerWallet1/Views/Peer2peer/RequestPayment.swift
+++ b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
@@ -80,6 +80,7 @@ struct RequestPayment: View {
                 )
         } } // ScrollVStack
         .frame(maxWidth: .infinity, alignment: .leading)
+//        .scrollBounceBehavior(.basedOnSize)  needs iOS 16.4
         .padding(.horizontal)   // Lists do this automatically, but this is a 
VStack
         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
         .navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift 
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index b5c4f5c..4d28a0e 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -103,6 +103,7 @@ struct SendAmount: View {
                 )
         } } // ScrollVStack
         .frame(maxWidth: .infinity, alignment: .leading)
+//        .scrollBounceBehavior(.basedOnSize)  needs iOS 16.4
         .padding(.horizontal)
         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
         .navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift 
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
index f810da7..e97106a 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -77,7 +77,7 @@ struct P2pReceiveURIView: View {
             symLog.log("onAppear")
             DebugViewC.shared.setSheetID(SHEET_RCV_P2P)
         }
-        .task {
+        .task { // must be here ond not at LoadingView(), because this needs 
to run a 2nd time after ToS
             do { // TODO: cancelled
                 symLog.log(".task")
                 let ppResponse = try await 
model.preparePeerPushCreditM(url.absoluteString)
diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift 
b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
index 9099f45..8be8ae5 100644
--- a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
+++ b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
@@ -88,6 +88,7 @@ struct ManualDetailsV: View {
         if let accountDetails = details.exchangeCreditAccountDetails {
             if !iconOnly {
                 Text("The Exchange is waiting for your wire-transfer.")
+                    .bold()
                     .multilineTextAlignment(.leading)
                     .listRowSeparator(.hidden)
             }

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