summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Stibane <marc@taler.net>2024-01-28 14:48:38 +0100
committerMarc Stibane <marc@taler.net>2024-01-28 14:48:38 +0100
commitc26d217ba97bed51f320b376e3dd45bae17209f5 (patch)
tree36fc96837d0cf79e8493fc268f3def80102f5951
parentf2a4f7e9b9a2adb73fbc8113e3390e56ec4ab172 (diff)
downloadtaler-ios-c26d217ba97bed51f320b376e3dd45bae17209f5.tar.gz
taler-ios-c26d217ba97bed51f320b376e3dd45bae17209f5.tar.bz2
taler-ios-c26d217ba97bed51f320b376e3dd45bae17209f5.zip
Cleanup, logging
-rw-r--r--TalerWallet1/Backend/WalletCore.swift2
-rw-r--r--TalerWallet1/Views/Banking/ManualWithdraw.swift1
-rw-r--r--TalerWallet1/Views/HelperViews/Buttons.swift44
-rw-r--r--TalerWallet1/Views/Peer2peer/P2PSubjectV.swift1
-rw-r--r--TalerWallet1/Views/Peer2peer/RequestPayment.swift1
-rw-r--r--TalerWallet1/Views/Peer2peer/SendAmount.swift1
-rw-r--r--TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift2
-rw-r--r--TalerWallet1/Views/Transactions/ManualDetailsV.swift1
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)
}