1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 22:30:32 +05:30
yattee/Apple TV/VideosView.swift
2021-06-26 13:37:24 +02:00

23 lines
660 B
Swift

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