mirror of
https://github.com/yattee/yattee.git
synced 2025-10-17 21:08:16 +00:00
New channel navigation
This commit is contained in:
@@ -44,22 +44,8 @@ struct AppTabNavigation: View {
|
||||
}
|
||||
.id(accounts.current?.id ?? "")
|
||||
.environment(\.navigationStyle, .tab)
|
||||
.background(
|
||||
EmptyView().sheet(isPresented: $navigation.presentingChannel) {
|
||||
if let channel = recents.presentedChannel {
|
||||
NavigationView {
|
||||
ChannelVideosView(channel: channel)
|
||||
.environment(\.managedObjectContext, persistenceController.container.viewContext)
|
||||
.environment(\.inChannelView, true)
|
||||
.environmentObject(accounts)
|
||||
.environmentObject(navigation)
|
||||
.environmentObject(player)
|
||||
.environmentObject(subscriptions)
|
||||
.environmentObject(thumbnailsModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
.overlay(channelView)
|
||||
|
||||
.background(
|
||||
EmptyView().sheet(isPresented: $navigation.presentingPlaylist) {
|
||||
if let playlist = recents.presentedPlaylist {
|
||||
@@ -188,4 +174,16 @@ struct AppTabNavigation: View {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private var channelView: some View {
|
||||
ChannelVideosView()
|
||||
.environment(\.managedObjectContext, persistenceController.container.viewContext)
|
||||
.environment(\.inChannelView, true)
|
||||
.environment(\.navigationStyle, .tab)
|
||||
.environmentObject(accounts)
|
||||
.environmentObject(navigation)
|
||||
.environmentObject(player)
|
||||
.environmentObject(subscriptions)
|
||||
.environmentObject(thumbnailsModel)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user