From 2b17735cb08fd903929ef57115b536a288a9143f Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 10 Sep 2019 07:49:24 -0500 Subject: [PATCH] Fix detail view overlay bug --- iOS/SceneCoordinator.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 4e1aa3d28..42f9e53b4 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -40,7 +40,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { if let detail = masterNavigationController.viewControllers.last as? DetailViewController { return detail } - if let subSplit = rootSplitViewController.viewControllers.last?.children.first as? UISplitViewController { + if let subSplit = subSplitViewController { if let navController = subSplit.viewControllers.last as? UINavigationController { return navController.topViewController as? DetailViewController } @@ -1601,9 +1601,6 @@ private extension SceneCoordinator { masterNavigationController.viewControllers = [masterFeedViewController] } - configureDoubleSplit() - installTimelineControllerIfNecessary(animated: false) - let controller: UIViewController = { if let result = detailViewController { return result @@ -1612,6 +1609,9 @@ private extension SceneCoordinator { } }() + configureDoubleSplit() + installTimelineControllerIfNecessary(animated: false) + // Create the new sub split controller (wrapped in the shim of course) and add the timeline in the primary position let masterTimelineNavController = subSplitViewController!.viewControllers.first as! UINavigationController masterTimelineNavController.viewControllers = [masterTimelineViewController!]