Fix iOS crash on article disappear: don't animate showBars() in viewWillDisappear.

This commit is contained in:
Brent Simmons committed 2026-05-18 16:24:30 -07:00
1 parent d1200ef79f
commit a8885d0444
2 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -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() {
+3 -3
View File
@@ -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()
}