diff --git a/Apple TV/VideosView.swift b/Apple TV/VideosView.swift index 134cc578..a81310cc 100644 --- a/Apple TV/VideosView.swift +++ b/Apple TV/VideosView.swift @@ -12,11 +12,11 @@ struct VideosView: View { @State private var showingViewOptions = false var body: some View { - Section { - if layout == .list { - VideosListView(videos: videos) - } else { + VStack { + if layout == .cells { VideosCellsView(videos: videos, columns: self.profile.cellsColumns) + } else { + VideosListView(videos: videos) } } .fullScreenCover(isPresented: $showingViewOptions) { ViewOptionsView() } diff --git a/Shared/ContentView.swift b/Shared/ContentView.swift index 59fd231f..9cab4b75 100644 --- a/Shared/ContentView.swift +++ b/Shared/ContentView.swift @@ -5,11 +5,9 @@ struct ContentView: View { @ObservedObject private var state = AppState() @ObservedObject private var profile = Profile() - @Default(.tabSelection) var tabSelection - var body: some View { NavigationView { - TabView(selection: $tabSelection) { + TabView(selection: tabSelection) { SubscriptionsView() .tabItem { Text("Subscriptions") } .tag(TabSelection.subscriptions) @@ -40,6 +38,13 @@ struct ContentView: View { .environmentObject(state) .environmentObject(profile) } + + var tabSelection: Binding { + Binding( + get: { Defaults[.tabSelection] }, + set: { Defaults[.tabSelection] = $0 } + ) + } } struct ContentView_Previews: PreviewProvider {