mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12:53 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user