1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 14:50:32 +05:30
yattee/Apple TV/VideosView.swift
2021-06-27 01:29:55 +02:00

26 lines
668 B
Swift

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