summaryrefslogtreecommitdiff
path: root/Hutch/App/HutchApp.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch/App/HutchApp.swift')
-rw-r--r--Hutch/App/HutchApp.swift18
1 files changed, 4 insertions, 14 deletions
diff --git a/Hutch/App/HutchApp.swift b/Hutch/App/HutchApp.swift
index 69d1311..2b1977a 100644
--- a/Hutch/App/HutchApp.swift
+++ b/Hutch/App/HutchApp.swift
@@ -28,20 +28,10 @@ struct HutchApp: App {
deepLinkLogger.error("Rejected URL: \(url.absoluteString, privacy: .public)")
}
}
- .onChange(of: HutchIntentNavigator.shared.pendingDestination) { _, destination in
- guard let destination else { return }
- HutchIntentNavigator.shared.pendingDestination = nil
- let link: DeepLink
- switch destination {
- case .home: link = .home
- case .work: link = .work
- case .builds: link = .buildsTab
- case .repositories: link = .repositoriesTab
- case .trackers: link = .trackersTab
- case .systemStatus: link = .systemStatus
- case .lookup: link = .lookup
- }
- appState.pendingDeepLink = link
+ .onChange(of: HutchIntentNavigator.shared.pendingRoute) { _, route in
+ guard let route else { return }
+ HutchIntentNavigator.shared.pendingRoute = nil
+ appState.open(route)
}
}
}