commit bac7a5cf44326b8eeb852d8c41611cbbda451331 parent 89fcac52b7ebbfcb0a0c4d91ccc41e0c4f375a7b Author: Marc Stibane <marc@taler.net> Date: Tue, 10 Mar 2026 16:08:02 +0100 Replace empty strings Diffstat:
9 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -167,7 +167,7 @@ class Controller: ObservableObject { if save { let scannedURL = ScannedURL(url: passedURL, command: urlCommand, time: .now) if scannedURLs.count > 5 { - self.logger.trace("removing: \(self.scannedURLs.first?.command.rawValue ?? "")") + self.logger.trace("removing: \(self.scannedURLs.first?.command.rawValue ?? EMPTYSTRING)") scannedURLs.remove(at: 0) } scannedURLs.append(scannedURL) diff --git a/TalerWallet1/Helper/BankDialects.swift b/TalerWallet1/Helper/BankDialects.swift @@ -14,7 +14,7 @@ enum BankDialectString { case warningText3 // consequence for 2nd, with currency name } -func localizedString(_ key: BankDialectString, forDialect: BankDialect?, _ option: String = "") -> String { +func localizedString(_ key: BankDialectString, forDialect: BankDialect?, _ option: String = EMPTYSTRING) -> String { if forDialect == .gls { switch key { case .deleteExchange: diff --git a/TalerWallet1/Helper/SwiftNFC.swift b/TalerWallet1/Helper/SwiftNFC.swift @@ -27,8 +27,8 @@ import CoreNFC public class NFCWriter: NSObject, ObservableObject, NFCNDEFReaderSessionDelegate { public var startAlert = String(localized: "Hold your iPhone near the tag.") - public var endAlert = "" - public var msg = "" + public var endAlert = EMPTYSTRING + public var msg = EMPTYSTRING public var type = "T" // T=Text - U=URL public var data: Data? = nil @@ -102,7 +102,8 @@ public class NFCWriter: NSObject, ObservableObject, NFCNDEFReaderSessionDelegate if nil != error { session.alertMessage = "Write to tag failed: \(error!)" } else { - session.alertMessage = self.endAlert != "" ? self.endAlert : "Write \(self.msg) to tag successful." + session.alertMessage = self.endAlert != EMPTYSTRING ? self.endAlert + : "Write \(self.msg) to tag successful." } session.invalidate() }) diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -154,7 +154,7 @@ struct MainView: View { switch controller.backendState { case .ready: mainContent case .error: ErrorView(stack.push("mainGroup"), - title: "", // TODO: String(localized: ""), + title: EMPTYSTRING, // TODO: String(localized: ""), copyable: true) {} default: LaunchAnimationView() } diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift b/TalerWallet1/Views/Main/WalletEmptyView.swift @@ -41,9 +41,9 @@ struct WalletEmptyView: View { var body: some View { let list = List { Section { - Text("Welcome to Taler Wallet!", comment: "") + Text("Welcome to Taler Wallet!") .talerFont(.headline) - Text("To make your first payment, withdraw digital cash.", comment: "") + Text("To make your first payment, withdraw digital cash.") .talerFont(.body) #if false let qrButton = Image(systemName: QRBUTTON) // "qrcode.viewfinder" @@ -79,23 +79,21 @@ struct WalletEmptyView: View { .padding(.bottom) } #if !TALER_WALLET - Text("If you don't have a Swiss bank account, you can simply try out the demo…", comment: "") + Text("If you don't have a Swiss bank account, you can simply try out the demo…") .talerFont(.body) #endif #if DEBUG // if developerMode { -// Text("Either deposit or send your money to a friend before you delete the app, or it will be lost.", comment: "") +// Text("Either deposit or send your money to a friend before you delete the app, or it will be lost.") // .talerFont(.body) // } #endif } header: { let firstHeader = EMPTYSTRING -// Text("Welcome to Taler Wallet!", comment: "") -// .talerFont(.title2) Text(firstHeader) .talerFont(.badge) - .foregroundColor(.primary) +// .foregroundColor(.primary) /// YIKES! when not specifying this color, the Text in the BarGraphHeader vanishes!!! .foregroundColor(WalletColors().secondary(colorScheme, colorSchemeContrast)) // .listRowInsets(EdgeInsets()) // << here !! diff --git a/TalerWallet1/Views/OIM/OIMbackground.swift b/TalerWallet1/Views/OIM/OIMbackground.swift @@ -104,7 +104,7 @@ struct OIMbackground<Content: View>: View { .scrollBounceBehavior(.basedOnSize, axes: .horizontal) } else { // Fallback on earlier versions zStack -// .navigationBarTitle("") // must set the title... +// .navigationBarTitle(EMPTYSTRING) // must set the title... .navigationBarHidden(true) // before you can hide the navigation bar // .tabBarHidden(true) // unfortunately this call doesn't exist } diff --git a/TalerWallet1/Views/Settings/BackupView.swift b/TalerWallet1/Views/Settings/BackupView.swift @@ -27,7 +27,7 @@ struct BackupView: View { @State private var created: Bool = false @State private var restored: Bool = false @State private var files: [String] = [] - @State private var filename: String = "" + @State private var filename: String = EMPTYSTRING @State private var selectedBackup: String? = nil @State private var showRestoreAlert: Bool = false diff --git a/TalerWallet1/Views/Settings/ReportView.swift b/TalerWallet1/Views/Settings/ReportView.swift @@ -24,7 +24,7 @@ struct ReportView: View { @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic @State private var creating: Bool = false - @State private var report: String = "" + @State private var report: String = EMPTYSTRING @State private var expanded: Bool = false private func createReport() { diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -54,7 +54,7 @@ struct TransactionSummaryV: View { @State private var ignoreThis: Bool = false @State private var didDelete: Bool = false - @State var jsonTransaction: String = "" + @State var jsonTransaction: String = EMPTYSTRING @State var viewId = UUID() @Namespace var topID @@ -68,12 +68,12 @@ struct TransactionSummaryV: View { includeContractTerms: true, viewHandles: false) { jsonTransaction = json } else { - jsonTransaction = "" + jsonTransaction = EMPTYSTRING } } } else { withAnimation{ talerTX = TalerTransaction(dummyCurrency: DEMOCURRENCY); viewId = UUID() } - jsonTransaction = "" + jsonTransaction = EMPTYSTRING } }