mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Fix URL handling on macOS
This commit is contained in:
@@ -131,10 +131,6 @@ struct ContentView: View {
|
||||
|
||||
NavigationModel.shared.presentingOpenVideos = false
|
||||
}
|
||||
.onOpenURL { url in
|
||||
URLBookmarkModel.shared.saveBookmark(url)
|
||||
OpenURLHandler(navigationStyle: navigationStyle).handle(url)
|
||||
}
|
||||
.background(
|
||||
EmptyView().sheet(isPresented: $navigation.presentingAddToPlaylist) {
|
||||
AddToPlaylistView(video: navigation.videoToAddToPlaylist)
|
||||
@@ -173,16 +169,6 @@ struct ContentView: View {
|
||||
#endif
|
||||
}
|
||||
|
||||
var navigationStyle: NavigationStyle {
|
||||
#if os(iOS)
|
||||
return horizontalSizeClass == .compact ? .tab : .sidebar
|
||||
#elseif os(tvOS)
|
||||
return .tab
|
||||
#else
|
||||
return .sidebar
|
||||
#endif
|
||||
}
|
||||
|
||||
@ViewBuilder var videoPlayer: some View {
|
||||
if player.presentingPlayer {
|
||||
playerView
|
||||
@@ -199,7 +185,6 @@ struct ContentView: View {
|
||||
|
||||
var playerView: some View {
|
||||
VideoPlayerView()
|
||||
.environment(\.navigationStyle, navigationStyle)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user