From c3adb37da079d6341ed1564666853b2316e5fa03 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Thu, 4 Jan 2024 21:24:22 +0100 Subject: [PATCH] More fixes for slideover mode --- IceCubesApp/App/Main/AppView.swift | 2 +- .../Status/Row/Subviews/StatusRowMediaPreviewView.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IceCubesApp/App/Main/AppView.swift b/IceCubesApp/App/Main/AppView.swift index 6c88d880..c02e7824 100644 --- a/IceCubesApp/App/Main/AppView.swift +++ b/IceCubesApp/App/Main/AppView.swift @@ -36,7 +36,7 @@ struct AppView: View { } var availableTabs: [Tab] { - if UIDevice.current.userInterfaceIdiom == .phone { + if UIDevice.current.userInterfaceIdiom == .phone || horizontalSizeClass == .compact { return appAccountsManager.currentClient.isAuth ? iosTabs.tabs : Tab.loggedOutTab() } return appAccountsManager.currentClient.isAuth ? Tab.loggedInTabs() : Tab.loggedOutTab() diff --git a/Packages/Status/Sources/Status/Row/Subviews/StatusRowMediaPreviewView.swift b/Packages/Status/Sources/Status/Row/Subviews/StatusRowMediaPreviewView.swift index fd931620..97cf867c 100644 --- a/Packages/Status/Sources/Status/Row/Subviews/StatusRowMediaPreviewView.swift +++ b/Packages/Status/Sources/Status/Row/Subviews/StatusRowMediaPreviewView.swift @@ -11,6 +11,7 @@ public struct StatusRowMediaPreviewView: View { @Environment(\.openWindow) private var openWindow @Environment(\.extraLeadingInset) private var extraLeadingInset: CGFloat @Environment(\.isCompact) private var isCompact: Bool + @Environment(\.horizontalSizeClass) private var horizontalSizeClass @Environment(SceneDelegate.self) private var sceneDelegate @Environment(UserPreferences.self) private var preferences @Environment(QuickLook.self) private var quickLook @@ -39,7 +40,7 @@ public struct StatusRowMediaPreviewView: View { var sidebarWidth: CGFloat = 0 var secondaryColumnWidth: CGFloat = 0 let layoutPading: CGFloat = .layoutPadding * 2 - if UIDevice.current.userInterfaceIdiom == .pad { + if UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass != .compact { sidebarWidth = .sidebarWidth if preferences.showiPadSecondaryColumn { secondaryColumnWidth = .secondaryColumnWidth