Minor code style fixes, remove unneeded views

This commit is contained in:
Arkadiusz Fal
2021-08-01 23:25:50 +02:00
parent 64ff1afa70
commit 66c8b647bf
8 changed files with 30 additions and 70 deletions

View File

@@ -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() }
}
}

View File

@@ -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()
}
}
}