Correct scenario where article view controller wasn't getting popped of the navigation stack when there wasn't a selected article.
This commit is contained in:
parent
33c487de85
commit
4f3f56bda5
|
@ -1102,15 +1102,15 @@ extension SceneCoordinator: UISplitViewControllerDelegate {
|
||||||
return subSplitViewController
|
return subSplitViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
guard currentArticle != nil else {
|
if let articleViewController = masterNavigationController.viewControllers.last as? ArticleViewController {
|
||||||
let articleViewController = UIStoryboard.main.instantiateController(ofType: ArticleViewController.self)
|
masterNavigationController.popViewController(animated: false)
|
||||||
articleViewController.coordinator = self
|
|
||||||
let controller = addNavControllerIfNecessary(articleViewController, showButton: true)
|
let controller = addNavControllerIfNecessary(articleViewController, showButton: true)
|
||||||
return controller
|
return controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if let articleViewController = masterNavigationController.viewControllers.last as? ArticleViewController {
|
if currentArticle == nil {
|
||||||
masterNavigationController.popViewController(animated: false)
|
let articleViewController = UIStoryboard.main.instantiateController(ofType: ArticleViewController.self)
|
||||||
|
articleViewController.coordinator = self
|
||||||
let controller = addNavControllerIfNecessary(articleViewController, showButton: true)
|
let controller = addNavControllerIfNecessary(articleViewController, showButton: true)
|
||||||
return controller
|
return controller
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue