diff options
Diffstat (limited to 'Hutch/App/RootView.swift')
| -rw-r--r-- | Hutch/App/RootView.swift | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Hutch/App/RootView.swift b/Hutch/App/RootView.swift index f615541..9c4e71a 100644 --- a/Hutch/App/RootView.swift +++ b/Hutch/App/RootView.swift @@ -12,6 +12,8 @@ struct RootView: View { @State private var isResolvingDeepLink = false var body: some View { + @Bindable var appState = appState + Group { switch appState.authPhase { case .launching: @@ -37,6 +39,23 @@ struct RootView: View { .onChange(of: appState.pendingTabNavigation) { _, newValue in consumePendingTabNavigationIfPossible(newValue) } + .alert( + "Couldn't Open Link", + isPresented: Binding( + get: { appState.deepLinkError != nil }, + set: { isPresented in + if !isPresented { + appState.deepLinkError = nil + } + } + ) + ) { + Button("OK") { + appState.deepLinkError = nil + } + } message: { + Text(appState.deepLinkError ?? "") + } } // MARK: - Tab View @@ -198,7 +217,7 @@ struct RootView: View { await settleNavigationTransition() repoPath.append(summary) } catch { - // Silently fail — the repo may not exist or be inaccessible + appState.presentRepositoryDeepLinkError() } } } @@ -221,7 +240,7 @@ struct RootView: View { ticketId: ticketId )) } catch { - // Silently fail + appState.presentTicketDeepLinkError() } } } |
