Improve URL handling

This commit is contained in:
Arkadiusz Fal
2022-06-25 00:48:57 +02:00
parent ba1115fe2a
commit 786418f82e
26 changed files with 616 additions and 216 deletions

View File

@@ -76,7 +76,15 @@ struct ContentView: View {
}
)
#if !os(tvOS)
.onOpenURL { OpenURLHandler(accounts: accounts, player: player).handle($0) }
.onOpenURL {
OpenURLHandler(
accounts: accounts,
navigation: navigation,
recents: recents,
player: player,
search: search
).handle($0)
}
.background(
EmptyView().sheet(isPresented: $navigation.presentingAddToPlaylist) {
AddToPlaylistView(video: navigation.videoToAddToPlaylist)
@@ -110,9 +118,7 @@ struct ContentView: View {
secondaryButton: .cancel()
)
}
.alert(isPresented: $navigation.presentingAlert) {
Alert(title: Text(navigation.alertTitle), message: Text(navigation.alertMessage))
}
.alert(isPresented: $navigation.presentingAlert) { navigation.alert }
}
func openWelcomeScreenIfAccountEmpty() {