mirror of
https://github.com/yattee/yattee.git
synced 2025-10-31 20:52:04 +00:00
Minor code style fixes, remove unneeded views
This commit is contained in:
@@ -6,6 +6,8 @@ struct TVNavigationView: View {
|
||||
|
||||
@State private var showingOptions = false
|
||||
|
||||
@Default(.showingAddToPlaylist) var showingAddToPlaylist
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
TabView(selection: $navigationState.tabSelection) {
|
||||
@@ -30,6 +32,7 @@ struct TVNavigationView: View {
|
||||
.tag(TabSelection.search)
|
||||
}
|
||||
.fullScreenCover(isPresented: $showingOptions) { OptionsView() }
|
||||
.fullScreenCover(isPresented: $showingAddToPlaylist) { AddToPlaylistView() }
|
||||
.fullScreenCover(isPresented: $navigationState.showingVideoDetails) {
|
||||
if let video = navigationState.video {
|
||||
VideoDetailsView(video)
|
||||
@@ -42,7 +45,11 @@ struct TVNavigationView: View {
|
||||
ChannelView(id: channel.id)
|
||||
}
|
||||
}
|
||||
|
||||
.fullScreenCover(isPresented: $navigationState.showingVideo) {
|
||||
if let video = navigationState.video {
|
||||
VideoPlayerView(video)
|
||||
}
|
||||
}
|
||||
.onPlayPauseCommand { showingOptions.toggle() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct VideoLoading: View {
|
||||
var video: Video
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
|
||||
VStack {
|
||||
Text(video.title)
|
||||
|
||||
Text("Loading...")
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user