Fix detail view overlay bug

This commit is contained in:
Maurice Parker 2019-09-10 07:49:24 -05:00
parent e3361abc77
commit 2b17735cb0
1 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
if let detail = masterNavigationController.viewControllers.last as? DetailViewController { if let detail = masterNavigationController.viewControllers.last as? DetailViewController {
return detail return detail
} }
if let subSplit = rootSplitViewController.viewControllers.last?.children.first as? UISplitViewController { if let subSplit = subSplitViewController {
if let navController = subSplit.viewControllers.last as? UINavigationController { if let navController = subSplit.viewControllers.last as? UINavigationController {
return navController.topViewController as? DetailViewController return navController.topViewController as? DetailViewController
} }
@ -1601,9 +1601,6 @@ private extension SceneCoordinator {
masterNavigationController.viewControllers = [masterFeedViewController] masterNavigationController.viewControllers = [masterFeedViewController]
} }
configureDoubleSplit()
installTimelineControllerIfNecessary(animated: false)
let controller: UIViewController = { let controller: UIViewController = {
if let result = detailViewController { if let result = detailViewController {
return result 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 // 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 let masterTimelineNavController = subSplitViewController!.viewControllers.first as! UINavigationController
masterTimelineNavController.viewControllers = [masterTimelineViewController!] masterTimelineNavController.viewControllers = [masterTimelineViewController!]