Apply saved display mode in willConnectTo

This commit is contained in:
Stuart Breckenridge committed 2026-01-10 17:15:15 +08:00
1 parent 46cd724aa9
commit 1ef8945d10
1 file changed
+1 -8
+1 -8
View File
@@ -24,14 +24,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
let rootViewController = window!.rootViewController as! RootSplitViewController
rootViewController.presentsWithGesture = true
rootViewController.showsSecondaryOnlyButton = true
rootViewController.preferredDisplayMode = .oneBesideSecondary
Task { @MainActor in
// Ensure Feeds view shows on iPad — otherwise the UI may be empty.
if UIDevice.current.userInterfaceIdiom == .pad {
rootViewController.show(.primary)
}
}
rootViewController.preferredDisplayMode = UISplitViewController.DisplayMode(rawValue: AppDefaults.shared.splitViewPreferredDisplayMode) ?? .oneBesideSecondary
coordinator = SceneCoordinator(rootSplitViewController: rootViewController)
rootViewController.coordinator = coordinator