mirror of
https://github.com/yattee/yattee.git
synced 2026-10-31 00:47:17 +00:00
Show the sidebar layout on the iPhone Duo inner screen
The sidebar layout was gated on iPad idiom. It now appears wherever there is room for it: regular width and regular height, or an iPad with regular width (a short Stage Manager window keeps it). That covers the Duo inner screen in both orientations, while large iPhones in landscape and the Duo outer screen keep the tab bar. The subscriptions feed's channel sidebar follows the same rule, and Sidebar settings are offered on devices with a hinge. SwiftUI's sidebarAdaptable TabView never shows a sidebar on iPhone idiom, so the iOS sidebar layout now uses the NavigationSplitView with a list sidebar that macOS already used, on iPad as well. The sidebar layout shows the floating mini player instead of the tab bar accessory.
This commit is contained in:
@@ -19,6 +19,7 @@ struct SubscriptionsView: View {
|
||||
#endif
|
||||
#if os(iOS)
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||
@Environment(\.verticalSizeClass) private var verticalSizeClass
|
||||
#endif
|
||||
@State private var feedCache = SubscriptionFeedCache.shared
|
||||
@State private var subscriptions: [Subscription] = []
|
||||
@@ -1138,8 +1139,10 @@ struct SubscriptionsView: View {
|
||||
private static let iPadSidebarMinWidth = 220.0
|
||||
private static let iPadSidebarMaxWidth = 420.0
|
||||
|
||||
/// Room for the channel sidebar next to the feed: wherever the app itself
|
||||
/// uses the sidebar layout (iPad, iPhone Duo inner screen).
|
||||
private var isIPadRegular: Bool {
|
||||
UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .regular
|
||||
NavigationLayout.usesSidebar(horizontalSizeClass: horizontalSizeClass, verticalSizeClass: verticalSizeClass)
|
||||
}
|
||||
|
||||
private var clampedIPadSidebarWidth: CGFloat {
|
||||
|
||||
Reference in New Issue
Block a user