Guard WebViewController.showBars() against running when bars aren't hidden.

This commit is contained in:
Brent Simmons committed 2026-05-18 16:50:43 -07:00
1 parent b100374065
commit c9d54214e3
1 file changed
+6
+6
View File
@@ -217,6 +217,12 @@ final class WebViewController: UIViewController {
}
func showBars(animated: Bool = true) {
// Skip when bars aren't hidden. Avoids redundant layout work on every back-navigation
// and — more importantly — avoids triggering a layout pass during viewWillDisappear,
// which has tripped an Auto Layout (NSISEngine) assertion in production crash reports.
guard AppDefaults.shared.articleFullscreenEnabled else {
return
}
AppDefaults.shared.articleFullscreenEnabled = false
coordinator.showStatusBar()
topShowBarsViewConstraint?.constant = 0