commit e4ccd38fe236d6daffaf21ebed2b79c1e8c283e7
parent e3343266f6febb5f19ace98cf084d2fa97103cd7
Author: Marc Stibane <marc@taler.net>
Date: Fri, 6 Mar 2026 00:42:20 +0100
showUrlSheet
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift
@@ -115,6 +115,7 @@ class Controller: ObservableObject {
@Published var oimModeActive: Bool = false
@Published var oimSheetActive: Bool = false
@Published var diagnosticModeEnabled: Bool = false
+ @Published var talerURI: URL? = nil
@AppStorage("useHaptics") var useHaptics: Bool = true // extension mustn't define this, so it must be here
@AppStorage("playSoundsI") var playSoundsI: Int = 1 // extension mustn't define this, so it must be here
@AppStorage("playSoundsB") var playSoundsB: Bool = false
diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift
@@ -259,6 +259,14 @@ struct MainView: View {
showUrlSheet = true // raise sheet
}
}
+ .onChange(of: controller.talerURI) { url in
+ if url != nil {
+ urlToOpen = url
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) {
+ controller.talerURI = nil
+ showUrlSheet = true // raise sheet
+ } } }
+
.onChange(of: qrButtonTapped) { tapped in
if tapped {
let delay = if #available(iOS 16.4, *) { 0.5 } else { 0.01 }