Fix visible tvOS sections

This commit is contained in:
Arkadiusz Fal 2022-11-15 15:27:23 +01:00
parent 78ff495927
commit 66c9fa773c

View File

@ -17,6 +17,7 @@ struct TVNavigationView: View {
.tabItem { Text("Home") } .tabItem { Text("Home") }
.tag(TabSelection.home) .tag(TabSelection.home)
if !accounts.isEmpty {
if visibleSections.contains(.subscriptions), accounts.app.supportsSubscriptions, accounts.api.signedIn { if visibleSections.contains(.subscriptions), accounts.app.supportsSubscriptions, accounts.api.signedIn {
LazyView(SubscriptionsView()) LazyView(SubscriptionsView())
.tabItem { Text("Subscriptions") } .tabItem { Text("Subscriptions") }
@ -40,6 +41,7 @@ struct TVNavigationView: View {
.tabItem { Text("Playlists") } .tabItem { Text("Playlists") }
.tag(TabSelection.playlists) .tag(TabSelection.playlists)
} }
}
LazyView(NowPlayingView()) LazyView(NowPlayingView())
.tabItem { Text("Now Playing") } .tabItem { Text("Now Playing") }