Configure three panel mode when coming from background. Issue #1251

This commit is contained in:
Maurice Parker 2019-11-05 15:46:28 -06:00
parent 67a906b095
commit 05e0e34f6b
2 changed files with 3 additions and 3 deletions

View File

@ -940,13 +940,12 @@ extension SceneCoordinator: UISplitViewControllerDelegate {
}
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
if masterNavigationController.viewControllers.count == 3 {
return nil
} else {
if currentArticle == nil {
let articleViewController = UIStoryboard.main.instantiateController(ofType: ArticleViewController.self)
articleViewController.coordinator = self
return articleViewController
}
return nil
}
}

View File

@ -58,6 +58,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func sceneWillEnterForeground(_ scene: UIScene) {
appDelegate.prepareAccountsForForeground()
self.coordinator.configureThreePanelMode(for: window!.frame.size)
}
func stateRestorationActivity(for scene: UIScene) -> NSUserActivity? {