mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Top level deeplink handling (#1660)
* Handle link opening on the top most levels and prepare for percolating them throughout the app * Add support for a custom app scheme * Add specific AppRoute parsers. * Integrate custom scheme in the AppRouteURLParser * Switch to `element://call` and cleanup route parsing
This commit is contained in:
@@ -35,7 +35,14 @@ struct Application: App {
|
||||
WindowGroup {
|
||||
appCoordinator.toPresentable()
|
||||
.statusBarHidden(shouldHideStatusBar)
|
||||
.onOpenURL { appCoordinator.handleUniversalLink($0) }
|
||||
.environment(\.openURL, OpenURLAction { url in
|
||||
if appCoordinator.handleDeepLink(url) {
|
||||
return .handled
|
||||
}
|
||||
|
||||
return .systemAction
|
||||
})
|
||||
.onOpenURL { appCoordinator.handleDeepLink($0) }
|
||||
.introspect(.window, on: .iOS(.v16)) { window in
|
||||
// Workaround for SwiftUI not consistently applying the tint colour to Alerts/Confirmation Dialogs.
|
||||
window.tintColor = .compound.textActionPrimary
|
||||
|
||||
Reference in New Issue
Block a user