Remove legacy tvOS list layout

This commit is contained in:
Arkadiusz Fal
2021-09-27 00:28:42 +02:00
parent 994f1f9215
commit 17291b47e0
15 changed files with 27 additions and 160 deletions

View File

@@ -4,8 +4,6 @@ import SwiftUI
struct OptionsView: View {
@EnvironmentObject<NavigationModel> private var navigation
@Default(.layout) private var layout
@Environment(\.dismiss) private var dismiss
var body: some View {
@@ -18,7 +16,7 @@ struct OptionsView: View {
Spacer()
CoverSectionView("View Options") {
CoverSectionRowView("Show videos as") { nextLayoutButton }
// CoverSectionRowView("Show videos as") { nextLayoutButton }
}
CoverSectionView(divider: false) {
@@ -39,19 +37,6 @@ struct OptionsView: View {
}
.background(.thinMaterial)
}
var nextLayoutButton: some View {
Button(layout.name) {
self.layout = layout.next()
}
.contextMenu {
ForEach(ListingLayout.allCases) { layout in
Button(layout.name) {
Defaults[.layout] = layout
}
}
}
}
}
struct OptionsView_Previews: PreviewProvider {