mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Fix iOS crash on article disappear: don't animate showBars() in viewWillDisappear.
This commit is contained in:
1 parent
d1200ef79f
commit
a8885d0444
2 files changed
+6
-4
No files matched your search
@@ -219,7 +219,9 @@ final class ArticleViewController: UIViewController {
|
||||
endFind()
|
||||
searchBar.shouldBeginEditing = false
|
||||
}
|
||||
currentWebViewController?.showBars()
|
||||
// Pass animated: false — animating the nav bar / toolbar visibility change during the
|
||||
// disappear transition triggers an Auto Layout assertion (NSISEngine) and crashes.
|
||||
currentWebViewController?.showBars(animated: false)
|
||||
}
|
||||
|
||||
override func viewSafeAreaInsetsDidChange() {
|
||||
|
||||
@@ -216,13 +216,13 @@ final class WebViewController: UIViewController {
|
||||
loadWebView(replaceExistingWebView: true)
|
||||
}
|
||||
|
||||
func showBars() {
|
||||
func showBars(animated: Bool = true) {
|
||||
AppDefaults.shared.articleFullscreenEnabled = false
|
||||
coordinator.showStatusBar()
|
||||
topShowBarsViewConstraint?.constant = 0
|
||||
bottomShowBarsViewConstraint?.constant = 0
|
||||
navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
navigationController?.setToolbarHidden(false, animated: true)
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
navigationController?.setToolbarHidden(false, animated: animated)
|
||||
additionalSafeAreaInsets.bottom = 0
|
||||
configureContextMenuInteraction()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user