Change how first run works with split view — use .oneBesideSecondary display mode but explicitly show the Feeds view at startup.
This commit is contained in:
parent
4bd258b3fc
commit
60e48acf47
@ -26,11 +26,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
let rootViewController = window!.rootViewController as! RootSplitViewController
|
let rootViewController = window!.rootViewController as! RootSplitViewController
|
||||||
rootViewController.presentsWithGesture = true
|
rootViewController.presentsWithGesture = true
|
||||||
rootViewController.showsSecondaryOnlyButton = true
|
rootViewController.showsSecondaryOnlyButton = true
|
||||||
if AppDefaults.shared.isFirstRun {
|
rootViewController.preferredDisplayMode = .oneBesideSecondary
|
||||||
// This ensures that the Feeds view shows on first-run.
|
|
||||||
rootViewController.preferredDisplayMode = .twoBesideSecondary
|
Task { @MainActor in
|
||||||
} else {
|
// Ensure Feeds view shows on first run on iPad — otherwise the UI is empty.
|
||||||
rootViewController.preferredDisplayMode = .oneBesideSecondary
|
if UIDevice.current.userInterfaceIdiom == .pad && AppDefaults.shared.isFirstRun {
|
||||||
|
rootViewController.show(.primary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
coordinator = SceneCoordinator(rootSplitViewController: rootViewController)
|
coordinator = SceneCoordinator(rootSplitViewController: rootViewController)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user