Show the tvOS channels sidebar for a single-channel account

The sidebar hid itself below two channels, so an account with one
subscription lost the channel list, the manage-channels entry and the
switcher's persistent home next to View Options - and switching from a
many-channel account read as the sidebar breaking rather than a design
choice. One channel is enough to earn the sidebar; only an empty account
goes without it.
This commit is contained in:
Arkadiusz Fal
2026-09-14 09:01:26 +02:00
parent 82ef5267c4
commit a28346148a

View File

@@ -386,14 +386,14 @@ struct SubscriptionsView: View {
ZStack {
#if os(tvOS)
HStack(alignment: .top, spacing: 24) {
if showSidebar && subscriptionsLoaded && subscriptions.count > 1 {
if showSidebar && subscriptionsLoaded && !subscriptions.isEmpty {
tvOSChannelsSidebar
.frame(width: max(geometry.size.width * 0.28, 360), alignment: .leading)
.focusSection()
}
VStack(alignment: .leading, spacing: 16) {
if !showSidebar || subscriptions.count <= 1 {
if !showSidebar || subscriptions.isEmpty {
tvOSViewOptionsButton
}
@@ -1120,7 +1120,7 @@ struct SubscriptionsView: View {
#elseif os(iOS)
return isIPadRegular && showSidebar && subscriptionsLoaded && subscriptions.count > 1
#elseif os(tvOS)
return showSidebar && subscriptionsLoaded && subscriptions.count > 1
return showSidebar && subscriptionsLoaded && !subscriptions.isEmpty
#else
return false
#endif