mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Channels layout improvements, other UI fixes
This commit is contained in:
@@ -38,21 +38,26 @@ struct TVNavigationView: View {
|
||||
VideoDetailsView(video)
|
||||
}
|
||||
}
|
||||
.fullScreenCover(isPresented: $navigationState.showingChannel, onDismiss: {
|
||||
navigationState.showVideoDetailsIfNeeded()
|
||||
}) {
|
||||
if let channel = navigationState.channel {
|
||||
ChannelView(id: channel.id)
|
||||
}
|
||||
}
|
||||
.fullScreenCover(isPresented: $navigationState.showingVideo) {
|
||||
if let video = navigationState.video {
|
||||
VideoPlayerView(video)
|
||||
.environmentObject(playbackState)
|
||||
}
|
||||
}
|
||||
.fullScreenCover(isPresented: $navigationState.isChannelOpen, onDismiss: {
|
||||
navigationState.closeChannel(presentedChannel)
|
||||
}) {
|
||||
if presentedChannel != nil {
|
||||
ChannelVideosView(presentedChannel)
|
||||
.background(.thickMaterial)
|
||||
}
|
||||
}
|
||||
.onPlayPauseCommand { showingOptions.toggle() }
|
||||
}
|
||||
|
||||
fileprivate var presentedChannel: Channel! {
|
||||
navigationState.openChannels.first
|
||||
}
|
||||
}
|
||||
|
||||
struct TVNavigationView_Previews: PreviewProvider {
|
||||
|
Reference in New Issue
Block a user