mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix tab navigation environment objects
This commit is contained in:
parent
de09f9dd52
commit
02e66e4520
@ -52,6 +52,12 @@ struct AppTabNavigation: View {
|
|||||||
ChannelVideosView(channel: channel)
|
ChannelVideosView(channel: channel)
|
||||||
.environment(\.inChannelView, true)
|
.environment(\.inChannelView, true)
|
||||||
.environment(\.inNavigationView, true)
|
.environment(\.inNavigationView, true)
|
||||||
|
.environmentObject(accounts)
|
||||||
|
.environmentObject(navigation)
|
||||||
|
.environmentObject(player)
|
||||||
|
.environmentObject(subscriptions)
|
||||||
|
.environmentObject(thumbnailsModel)
|
||||||
|
|
||||||
.background(playerNavigationLink)
|
.background(playerNavigationLink)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +73,12 @@ struct AppTabNavigation: View {
|
|||||||
NavigationView {
|
NavigationView {
|
||||||
ChannelPlaylistView(playlist: playlist)
|
ChannelPlaylistView(playlist: playlist)
|
||||||
.environment(\.inNavigationView, true)
|
.environment(\.inNavigationView, true)
|
||||||
|
.environmentObject(accounts)
|
||||||
|
.environmentObject(navigation)
|
||||||
|
.environmentObject(player)
|
||||||
.environmentObject(subscriptions)
|
.environmentObject(subscriptions)
|
||||||
|
.environmentObject(thumbnailsModel)
|
||||||
|
|
||||||
.background(playerNavigationLink)
|
.background(playerNavigationLink)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +87,7 @@ struct AppTabNavigation: View {
|
|||||||
.background(
|
.background(
|
||||||
EmptyView().fullScreenCover(isPresented: $player.presentingPlayer) {
|
EmptyView().fullScreenCover(isPresented: $player.presentingPlayer) {
|
||||||
videoPlayer
|
videoPlayer
|
||||||
.environment(\.navigationStyle, .sidebar)
|
.environment(\.navigationStyle, .tab)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -160,7 +171,7 @@ struct AppTabNavigation: View {
|
|||||||
|
|
||||||
private var playerNavigationLink: some View {
|
private var playerNavigationLink: some View {
|
||||||
NavigationLink(isActive: $player.playerNavigationLinkActive, destination: {
|
NavigationLink(isActive: $player.playerNavigationLinkActive, destination: {
|
||||||
VideoPlayerView()
|
videoPlayer
|
||||||
.environment(\.inNavigationView, true)
|
.environment(\.inNavigationView, true)
|
||||||
}) {
|
}) {
|
||||||
EmptyView()
|
EmptyView()
|
||||||
|
Loading…
Reference in New Issue
Block a user