From c9d54214e346fc6cfa33724fdbfea3f96ac4e8d5 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 18 May 2026 16:50:43 -0700 Subject: [PATCH] Guard WebViewController.showBars() against running when bars aren't hidden. --- iOS/Article/WebViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 6e679ff75..23f097b97 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -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