From 60e48acf47f72034af7f7ca07284cc271a41cf4e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 11 Jan 2025 21:33:04 -0800 Subject: [PATCH] =?UTF-8?q?Change=20how=20first=20run=20works=20with=20spl?= =?UTF-8?q?it=20view=20=E2=80=94=C2=A0use=20.oneBesideSecondary=20display?= =?UTF-8?q?=20mode=20but=20explicitly=20show=20the=20Feeds=20view=20at=20s?= =?UTF-8?q?tartup.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/SceneDelegate.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/iOS/SceneDelegate.swift b/iOS/SceneDelegate.swift index fc757625a..b5086e77d 100644 --- a/iOS/SceneDelegate.swift +++ b/iOS/SceneDelegate.swift @@ -26,11 +26,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { let rootViewController = window!.rootViewController as! RootSplitViewController rootViewController.presentsWithGesture = true rootViewController.showsSecondaryOnlyButton = true - if AppDefaults.shared.isFirstRun { - // This ensures that the Feeds view shows on first-run. - rootViewController.preferredDisplayMode = .twoBesideSecondary - } else { - rootViewController.preferredDisplayMode = .oneBesideSecondary + rootViewController.preferredDisplayMode = .oneBesideSecondary + + Task { @MainActor in + // Ensure Feeds view shows on first run on iPad — otherwise the UI is empty. + if UIDevice.current.userInterfaceIdiom == .pad && AppDefaults.shared.isFirstRun { + rootViewController.show(.primary) + } } coordinator = SceneCoordinator(rootSplitViewController: rootViewController)