Correctly handle showing the detail view when the root view controller is collapsed

This commit is contained in:
Maurice Parker 2019-08-01 20:06:55 -05:00
parent e22088b284
commit 9e0a4aed00
1 changed files with 2 additions and 0 deletions

View File

@ -846,6 +846,8 @@ private extension AppCoordinator {
if isThreePanelMode { if isThreePanelMode {
let targetSplit = ensureDoubleSplit() let targetSplit = ensureDoubleSplit()
targetSplit.showDetailViewController(controller, sender: self) targetSplit.showDetailViewController(controller, sender: self)
} else if rootSplitViewController.isCollapsed {
rootSplitViewController.showDetailViewController(controller, sender: self)
} else { } else {
if let shimController = rootSplitViewController.viewControllers.last { if let shimController = rootSplitViewController.viewControllers.last {
shimController.replaceChildAndPinView(controller) shimController.replaceChildAndPinView(controller)