[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 40/204: EMPTYSTRING
From: |
gnunet |
Subject: |
[taler-taler-ios] 40/204: EMPTYSTRING |
Date: |
Thu, 05 Dec 2024 23:50:08 +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 39356f69a4ab9b82a0dd490b487f0c2577826178
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Oct 12 09:46:20 2024 +0200
EMPTYSTRING
---
TalerWallet1/Backend/WalletBackendError.swift | 8 ++++----
TalerWallet1/Controllers/DebugViewC.swift | 2 +-
TalerWallet1/Model/Transaction.swift | 4 ++--
TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift | 2 +-
TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift | 2 +-
TalerWallet1/Views/Balances/BalancesListView.swift | 2 +-
TalerWallet1/Views/HelperViews/CurrencyField.swift | 4 ++--
TalerWallet1/Views/HelperViews/TextFieldAlert.swift | 2 +-
TalerWallet1/Views/Main/ErrorView.swift | 2 +-
TalerWallet1/Views/Main/MainView.swift | 2 +-
TalerWallet1/Views/Settings/SettingsItem.swift | 3 +--
TalerWallet1/Views/Sheets/Sheet.swift | 2 +-
TalerWallet1/Views/Sheets/WithdrawExchangeV.swift | 4 ++--
TalerWallet1/Views/Transactions/ManualDetailsV.swift | 2 +-
TalerWallet1/Views/Transactions/TransactionSummaryV.swift | 6 +++---
15 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/TalerWallet1/Backend/WalletBackendError.swift
b/TalerWallet1/Backend/WalletBackendError.swift
index aa617ba..33af842 100644
--- a/TalerWallet1/Backend/WalletBackendError.swift
+++ b/TalerWallet1/Backend/WalletBackendError.swift
@@ -85,21 +85,21 @@ struct WalletBackendResponseError: Codable {
extension WalletCore {
static func serializeRequestError() -> WalletBackendResponseError {
return WalletBackendResponseError(code: -1, when: Timestamp.now(),
- hint: "Could not serialize
request.", message: "")
+ hint: "Could not serialize
request.", message: EMPTYSTRING)
}
static func parseResponseError() -> WalletBackendResponseError {
return WalletBackendResponseError(code: -2, when: Timestamp.now(),
- hint: "Could not parse response.",
message: "")
+ hint: "Could not parse response.",
message: EMPTYSTRING)
}
static func parseFailureError() -> WalletBackendResponseError {
return WalletBackendResponseError(code: -3, when: Timestamp.now(),
- hint: "Could not parse error
detail.", message: "")
+ hint: "Could not parse error
detail.", message: EMPTYSTRING)
}
static func walletError() -> WalletBackendResponseError {
return WalletBackendResponseError(code: -4, when: Timestamp.now(),
- hint: "Error detail.", message: "")
+ hint: "Error detail.", message:
EMPTYSTRING)
}
}
diff --git a/TalerWallet1/Controllers/DebugViewC.swift
b/TalerWallet1/Controllers/DebugViewC.swift
index 21f9046..0649927 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -125,7 +125,7 @@ struct DebugViewV: View {
// let _ = symLog.vlog() // just to get the # to compare it with
.onAppear & onDisappear
#endif
let viewIDString = debugViewC.viewID > 0 ? String(debugViewC.viewID)
- : ""
+ : EMPTYSTRING
HStack {
Spacer()
Spacer()
diff --git a/TalerWallet1/Model/Transaction.swift
b/TalerWallet1/Model/Transaction.swift
index b657f58..7300cab 100644
--- a/TalerWallet1/Model/Transaction.swift
+++ b/TalerWallet1/Model/Transaction.swift
@@ -280,7 +280,7 @@ struct TransactionCommon: Decodable, Sendable {
func localizedType(_ type: TransactionType) -> String {
switch type {
- case .dummy: return String("")
+ case .dummy: return String(EMPTYSTRING)
case .withdrawal: return String(localized: "Withdrawal",
comment: "TransactionType")
case .deposit: return String(localized: "Deposit",
@@ -686,7 +686,7 @@ enum Transaction: Decodable, Hashable, Identifiable,
Sendable {
case .peer2peer(let p2pTransaction):
result[EXCHANGEBASEURL] =
p2pTransaction.details.exchangeBaseUrl
result["summary"] = p2pTransaction.details.info.summary
- result[TALERURI] = p2pTransaction.details.talerUri ?? ""
+ result[TALERURI] = p2pTransaction.details.talerUri ??
EMPTYSTRING
case .recoup(let recoupTransaction):
result["reason"] = recoupTransaction.details.recoupReason
case .denomLoss(let denomLossTransaction):
diff --git a/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift
b/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift
index 1362d04..990d691 100644
--- a/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift
+++ b/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift
@@ -157,7 +157,7 @@ struct P2PSubjectV: View {
#if DEBUG
//struct SendPurpose_Previews: PreviewProvider {
// static var previews: some View {
-// @State var summary: String = ""
+// @State var summary: String = EMPTYSTRING
// @State var expireDays: UInt = 0
// let amount = Amount(currency: LONGCURRENCY, integer: 10, fraction: 0)
// SendPurpose(amountAvailable: amount,
diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift
b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift
index 7e9a561..15e8a01 100644
--- a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift
+++ b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift
@@ -319,7 +319,7 @@ struct SendAmountContent: View {
#if DEBUG
fileprivate struct Preview_Content: View {
@State private var amountToPreview = Amount(currency: DEMOCURRENCY, cent:
510)
- @State private var summary: String = ""
+ @State private var summary: String = EMPTYSTRING
@State private var currencyInfoL: CurrencyInfo =
CurrencyInfo.zero(DEMOCURRENCY)
@State private var noBalance: Balance? = nil
diff --git a/TalerWallet1/Views/Balances/BalancesListView.swift
b/TalerWallet1/Views/Balances/BalancesListView.swift
index 0547ed4..03d0901 100644
--- a/TalerWallet1/Views/Balances/BalancesListView.swift
+++ b/TalerWallet1/Views/Balances/BalancesListView.swift
@@ -25,7 +25,7 @@ struct BalancesListView: View {
@State private var lastReloadedBalances = 0
@State private var amountToTransfer = Amount.zero(currency: EMPTYSTRING)
// Update currency when used
- @State private var summary: String = ""
+ @State private var summary = EMPTYSTRING
/// runs on MainActor if called in some Task {}
@discardableResult
diff --git a/TalerWallet1/Views/HelperViews/CurrencyField.swift
b/TalerWallet1/Views/HelperViews/CurrencyField.swift
index c3e9141..21b422f 100644
--- a/TalerWallet1/Views/HelperViews/CurrencyField.swift
+++ b/TalerWallet1/Views/HelperViews/CurrencyField.swift
@@ -167,7 +167,7 @@ struct CurrencyTextfieldRepresentable: UIViewRepresentable {
private var textfieldRepresentable: CurrencyTextfieldRepresentable
// Last valid text input string to be displayed
- private var lastValidInput: String? = ""
+ private var lastValidInput: String? = EMPTYSTRING
init(_ representable: CurrencyTextfieldRepresentable) {
self.textfieldRepresentable = representable
@@ -222,7 +222,7 @@ struct CurrencyTextfieldRepresentable: UIViewRepresentable {
}
// Iterate through each char of the new string and compare LTR
with old string
- let char = (textField.text ?? "").first { next in
+ let char = (textField.text ?? EMPTYSTRING).first { next in
// If old text is empty or its next character doesn't match new
if oldText.isEmpty || next != oldText.removeFirst() {
// Found the mismatching character
diff --git a/TalerWallet1/Views/HelperViews/TextFieldAlert.swift
b/TalerWallet1/Views/HelperViews/TextFieldAlert.swift
index a68fee7..bd6ab76 100644
--- a/TalerWallet1/Views/HelperViews/TextFieldAlert.swift
+++ b/TalerWallet1/Views/HelperViews/TextFieldAlert.swift
@@ -61,7 +61,7 @@ extension View {
title: String,
doneText: String,
text: Binding<String>,
- placeholder: String = "",
+ placeholder: String = EMPTYSTRING,
action: @escaping (String) -> Void
) -> some View {
self.modifier(TextFieldAlert(isPresented: isPresented, title: title,
doneText: doneText, text: text, placeholder: placeholder, action: action))
diff --git a/TalerWallet1/Views/Main/ErrorView.swift
b/TalerWallet1/Views/Main/ErrorView.swift
index d322200..04fd5d6 100644
--- a/TalerWallet1/Views/Main/ErrorView.swift
+++ b/TalerWallet1/Views/Main/ErrorView.swift
@@ -18,6 +18,6 @@ struct ErrorView: View {
struct ErrorView_Previews: PreviewProvider {
static var previews: some View {
- ErrorView(errortext: "")
+ ErrorView(errortext: EMPTYSTRING)
}
}
diff --git a/TalerWallet1/Views/Main/MainView.swift
b/TalerWallet1/Views/Main/MainView.swift
index ad6caec..7a8a470 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -257,7 +257,7 @@ extension MainView {
@State private var showActionSheet = false
@State private var sheetHeight: CGFloat = .zero
@State private var amountToTransfer = Amount.zero(currency:
EMPTYSTRING) // Update currency when used
- @State private var summary: String = ""
+ @State private var summary: String = EMPTYSTRING
@State private var showSpendingHint = true
@State private var myExchange: Exchange? = nil
diff --git a/TalerWallet1/Views/Settings/SettingsItem.swift
b/TalerWallet1/Views/Settings/SettingsItem.swift
index 7feccee..374cfe2 100644
--- a/TalerWallet1/Views/Settings/SettingsItem.swift
+++ b/TalerWallet1/Views/Settings/SettingsItem.swift
@@ -158,7 +158,6 @@ struct SettingsTriState: View {
}
var body: some View {
let image = imageName(value)
- let accHint = description ?? "" // avoid automatic translation
of "" in accessibilityHint
VStack {
HStack {
@@ -192,7 +191,7 @@ struct SettingsTriState: View {
.accessibilityElement(children: .combine)
.accessibilityLabel(name)
.accessibility(value: Text(image.1))
- .accessibilityHint(accHint)
+ .accessibilityHint(description ?? EMPTYSTRING)
.padding([.bottom], 4)
}
}
diff --git a/TalerWallet1/Views/Sheets/Sheet.swift
b/TalerWallet1/Views/Sheets/Sheet.swift
index f89cfc1..18d2081 100644
--- a/TalerWallet1/Views/Sheets/Sheet.swift
+++ b/TalerWallet1/Views/Sheets/Sheet.swift
@@ -35,7 +35,7 @@ struct Sheet: View {
var body: some View {
let idString = debugViewC.sheetID > 0 ? String(debugViewC.sheetID)
- : "" // show nothing if 0
+ : EMPTYSTRING // show
nothing if 0
NavigationView {
Group {
if let error2 = model.error2 {
diff --git a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
index 0a91e5a..8c99fb6 100644
--- a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
@@ -19,7 +19,7 @@ struct WithdrawExchangeV: View {
@EnvironmentObject private var controller: Controller
@EnvironmentObject private var model: WalletModel
- @State private var amountToTransfer = Amount.zero(currency: "")
+ @State private var amountToTransfer = Amount.zero(currency: EMPTYSTRING)
@State private var exchange: Exchange? = nil
@State private var currencyInfo: CurrencyInfo = CurrencyInfo.zero(UNKNOWN)
@@ -62,7 +62,7 @@ struct WithdrawExchangeV: View {
} else {
let currency = exc.scopeInfo.currency
amountToTransfer.setCurrency(currency)
- // is already Amount.zero(currency: "")
+ // is already Amount.zero()
}
exchange = exc
} else {
diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
index a1ebf5b..660aa86 100644
--- a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
+++ b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
@@ -38,7 +38,7 @@ struct SegmentControl: View {
let detail = accountDetails[index]
let specs = detail.currencySpecification
let amount = detail.transferAmount
- let amountStr = amount?.formatted(specs: specs,
isNegative: false, useISO: false) ?? ""
+ let amountStr = amount?.formatted(specs: specs,
isNegative: false, useISO: false) ?? EMPTYSTRING
let bankName = detail.bankLabel
let a11yLabel = bankName != nil ? (bankName! + " " +
amountStr) : amountStr
// let _ = print(amountStr)
diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
index cc3e5c4..73d5923 100755
--- a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
+++ b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift
@@ -17,7 +17,7 @@ extension Transaction { // for Dummys
txState: TransactionState(major: .pending),
amountEffective: amount,
amountRaw: amount,
- transactionId: "",
+ transactionId: EMPTYSTRING,
timestamp: now,
txActions: [])
self = .dummy(DummyTransaction(common: common))
@@ -65,7 +65,7 @@ struct TransactionSummaryV: View {
@MainActor
@discardableResult
- func checkDismiss(_ notification: Notification, _ logStr: String = "") ->
Bool {
+ func checkDismiss(_ notification: Notification, _ logStr: String =
EMPTYSTRING) -> Bool {
if hasDone {
if let transition = notification.userInfo?[TRANSACTIONTRANSITION]
as? TransactionTransition {
if transition.transactionId ==
transaction.common.transactionId { // is the transition for THIS
transaction?
@@ -89,7 +89,7 @@ struct TransactionSummaryV: View {
}
}
- func checkReload(_ notification: Notification, _ logStr: String = "") {
+ func checkReload(_ notification: Notification, _ logStr: String =
EMPTYSTRING) {
if let transition = notification.userInfo?[TRANSACTIONTRANSITION] as?
TransactionTransition {
if transition.transactionId == transactionId { // is the
transition for THIS transaction?
let newMajor = transition.newTxState.major
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 19/204: cleanup, debug, (continued)
- [taler-taler-ios] 19/204: cleanup, debug, gnunet, 2024/12/05
- [taler-taler-ios] 21/204: SendAmountV, gnunet, 2024/12/05
- [taler-taler-ios] 31/204: a11y, gnunet, 2024/12/05
- [taler-taler-ios] 33/204: BarGraph 15, trust GetTransactionsV2, gnunet, 2024/12/05
- [taler-taler-ios] 32/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 37/204: debugging, gnunet, 2024/12/05
- [taler-taler-ios] 44/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 50/204: amountLastUsed, gnunet, 2024/12/05
- [taler-taler-ios] 18/204: Unsuccessfull trial to fix TX-Detailview jump onAppear, gnunet, 2024/12/05
- [taler-taler-ios] 26/204: hide TabBarView, gnunet, 2024/12/05
- [taler-taler-ios] 40/204: EMPTYSTRING,
gnunet <=
- [taler-taler-ios] 30/204: QrButton in Actions, gnunet, 2024/12/05
- [taler-taler-ios] 43/204: no Cancel for sheets, gnunet, 2024/12/05
- [taler-taler-ios] 51/204: scope, gnunet, 2024/12/05
- [taler-taler-ios] 45/204: pull-to-refresh haptics, gnunet, 2024/12/05
- [taler-taler-ios] 47/204: RotatingTaler for demo money, gnunet, 2024/12/05
- [taler-taler-ios] 49/204: wording, gnunet, 2024/12/05
- [taler-taler-ios] 56/204: innerHeight, gnunet, 2024/12/05
- [taler-taler-ios] 60/204: Bump version to 0.13.4 (0.13.6), gnunet, 2024/12/05
- [taler-taler-ios] 55/204: cleanup, docu, gnunet, 2024/12/05
- [taler-taler-ios] 59/204: Layout, wording, gnunet, 2024/12/05