From f1e01bd43faf78d56667b42680a2523674a1d679 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 9 Jan 2020 21:22:29 -0700 Subject: [PATCH] Automatically show the nav and toolbars when separating controllers. Issue #1593 --- iOS/Article/WebViewController.swift | 16 +++++++--------- iOS/SceneCoordinator.swift | 1 + 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 052506a16..c6fe79751 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -227,15 +227,13 @@ class WebViewController: UIViewController { } func showBars() { - if isFullScreenAvailable { - AppDefaults.articleFullscreenEnabled = false - coordinator.showStatusBar() - topShowBarsViewConstraint?.constant = 0 - bottomShowBarsViewConstraint?.constant = 0 - navigationController?.setNavigationBarHidden(false, animated: true) - navigationController?.setToolbarHidden(false, animated: true) - configureContextMenuInteraction() - } + AppDefaults.articleFullscreenEnabled = false + coordinator.showStatusBar() + topShowBarsViewConstraint?.constant = 0 + bottomShowBarsViewConstraint?.constant = 0 + navigationController?.setNavigationBarHidden(false, animated: true) + navigationController?.setToolbarHidden(false, animated: true) + configureContextMenuInteraction() } func hideBars() { diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 3cf46a1d0..07ea13baa 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -1102,6 +1102,7 @@ extension SceneCoordinator: UISplitViewControllerDelegate { } if let articleViewController = masterNavigationController.viewControllers.last as? ArticleViewController { + articleViewController.showBars(self) masterNavigationController.popViewController(animated: false) let controller = addNavControllerIfNecessary(articleViewController, showButton: true) return controller