commit 1f6a252a0c04c4781f8475f953e049c1de464d54 parent 067d99f4bd0c1276657a242119c4cba3c68f18a3 Author: Marc Stibane <marc@taler.net> Date: Thu, 10 Apr 2025 20:20:06 +0200 Limit error output of scanned/tapped URLs Diffstat:
| M | TalerWallet1/Controllers/Controller.swift | | | 1 | + |
| M | TalerWallet1/Views/Sheets/URLSheet.swift | | | 6 | ++++-- |
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -360,6 +360,7 @@ extension Controller { default: self.logger.error("❗️unknown command taler://\(command)") } + messageForSheet = command.lowercased() return .unknown } } diff --git a/TalerWallet1/Views/Sheets/URLSheet.swift b/TalerWallet1/Views/Sheets/URLSheet.swift @@ -61,11 +61,13 @@ struct URLSheet: View { case .refund: RefundURIView(stack: stack.push(), url: passedURL) default: // TODO: Error view + let unknown = String(localized: "Unknown command") VStack { let _ = symLog.log("Unknown command❗️ \(passedURL.absoluteString)") - Text(controller.messageForSheet ?? passedURL.absoluteString) + Text(controller.messageForSheet ?? unknown) + .talerFont(.title) } - .navigationTitle("Unknown command") + .navigationTitle(unknown) } } else { let message = String(localized: "Scanning...", comment: "loading")