taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 2ec71023a56267c92e0368df09c0ae7fa21bdda5
parent 251508dea517b498d79798c511b8411e35ab74b7
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 11 Jun 2026 16:02:27 +0200

Pasteboard cleanup

Diffstat:
MTalerWallet1/Controllers/TalerWallet1App.swift | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/TalerWallet1/Controllers/TalerWallet1App.swift b/TalerWallet1/Controllers/TalerWallet1App.swift @@ -52,10 +52,10 @@ struct TalerWallet1App: App { func inspectPasteboard(playSound: Bool) { let pasteboard = UIPasteboard.general - // We are only interested in strings - if !pasteboard.hasStrings { return } -// if !pasteboard.hasURLs { return } + // We are only interested in URLs + if !pasteboard.hasURLs { return } + // users get asked whether they want to paste, and only if they agree we go to completion pasteboard.detectPatterns(for: [UIPasteboard.DetectionPattern.probableWebURL], inItemSet: nil, completionHandler: { result in @@ -74,16 +74,14 @@ struct TalerWallet1App: App { if let pastedURL = string.toURL { let scheme = pastedURL.scheme if scheme?.lowercased() == "taler" { - print(string) +// print(string) post(pastedURL) return } } } } - - } - else { + } else { // We won't be retrieving the value, so we won't get a notification banner self.pastedWebURL = nil if playSound { @@ -94,7 +92,6 @@ struct TalerWallet1App: App { // This never gets called self.pastedWebURL = error.localizedDescription } - }) }