commit 56ec2a3bdbe5544c1de420c5c7c202ce252e8743 parent 2797abb10294fe463baf3ca6b93c39d184141f1e Author: Marc Stibane <marc@taler.net> Date: Tue, 18 Aug 2026 16:26:46 +0200 fix openURL opening other Taler app Diffstat:
| M | TalerWallet1/Views/Actions/ActionsSheet.swift | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -11,7 +11,7 @@ import taler_swift struct ScannedURLs: View { let stack: CallStack - @Environment(\.openURL) private var openURL +// @Environment(\.openURL) private var openURL NEVER EVER use this to pass a URL to myself - iOS might open another app @EnvironmentObject private var controller: Controller var body: some View { @@ -26,7 +26,8 @@ struct ScannedURLs: View { dismissTop(stack.push()) DispatchQueue.main.asyncAfter(deadline: .now() + 0.6) { // need to wait before opening the next sheet, otherwise SwiftUI doesn't update! - openURL(scannedURL.url) + // openURL(scannedURL.url) don't do this - iOS might open another wallet app + controller.talerURI = scannedURL.url // instead pass it via .onChange(of: controller.talerURI) directly to MainView } } Button(action: action) {