taler-ios

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

commit a918f544f65e9a748c1d59d891e11426d444f528
parent d1a6062bf4d4ee810406bbb1e5c1f6db2226be42
Author: Marc Stibane <marc@taler.net>
Date:   Fri,  5 Jun 2026 23:27:47 +0200

fix paste: directly showUrlSheet instead of openURL

Diffstat:
MTalerWallet1/Views/Main/MainView.swift | 9+++++++++
MTalerWallet1/Views/Main/WalletMain.swift | 6------
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -285,6 +285,15 @@ struct MainView: View { showScanner = true // switch to qrSheet => camera on } } + .onNotification(.PasteAction) { notification in + if let notifData = notification.userInfo?[NOTIFICATIONPASTE] as? PasteType { + symLog.log(".PasteAction: \(notifData)") + urlToOpen = notifData.pastedURL + DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { + showUrlSheet = true // raise sheet + } + } + } .onOpenURL { url in symLog.log(".onOpenURL: \(url)") diff --git a/TalerWallet1/Views/Main/WalletMain.swift b/TalerWallet1/Views/Main/WalletMain.swift @@ -326,12 +326,6 @@ struct WalletMain: View { ShareSheet.shareSheet(textToShare: textToShare, image: image) } } - .onNotification(.PasteAction){ notification in - if let notifData = notification.userInfo?[NOTIFICATIONPASTE] as? PasteType { - let pastedURL = notifData.pastedURL - openURL(pastedURL) - } - } .alert("You need to pass a legitimization procedure.", isPresented: $showKycAlert, actions: { openKycButton