Prevent crash when the web view load hasn't set up the tap zone constraints. Issue #1564

This commit is contained in:
Maurice Parker 2020-01-08 10:54:41 -07:00
parent 5058899ec1
commit 15569e62b2
1 changed files with 4 additions and 4 deletions

View File

@ -230,8 +230,8 @@ class WebViewController: UIViewController {
if isFullScreenAvailable {
AppDefaults.articleFullscreenEnabled = false
coordinator.showStatusBar()
topShowBarsViewConstraint.constant = 0
bottomShowBarsViewConstraint.constant = 0
topShowBarsViewConstraint?.constant = 0
bottomShowBarsViewConstraint?.constant = 0
navigationController?.setNavigationBarHidden(false, animated: true)
navigationController?.setToolbarHidden(false, animated: true)
configureContextMenuInteraction()
@ -242,8 +242,8 @@ class WebViewController: UIViewController {
if isFullScreenAvailable {
AppDefaults.articleFullscreenEnabled = true
coordinator.hideStatusBar()
topShowBarsViewConstraint.constant = -44.0
bottomShowBarsViewConstraint.constant = 44.0
topShowBarsViewConstraint?.constant = -44.0
bottomShowBarsViewConstraint?.constant = 44.0
navigationController?.setNavigationBarHidden(true, animated: true)
navigationController?.setToolbarHidden(true, animated: true)
configureContextMenuInteraction()