yattee/Apple TV/VideosView.swift
2021-06-28 17:27:53 +02:00

26 lines
659 B
Swift

import Defaults
import SwiftUI
struct VideosView: View {
@State private var profile = Profile()
var videos: [Video]
@Default(.layout) var layout
@Default(.tabSelection) var tabSelection
@State private var showingViewOptions = false
var body: some View {
VStack {
if layout == .cells {
VideosCellsView(videos: videos, columns: self.profile.cellsColumns)
} else {
VideosListView(videos: videos)
}
}
.fullScreenCover(isPresented: $showingViewOptions) { ViewOptionsView() }
.onPlayPauseCommand { showingViewOptions.toggle() }
}
}