From b6006c8265d96f058c904f4b4e1a068565f0d15b Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 23 Nov 2026 14:53:18 +0100 Subject: [PATCH] fix(ios): hide the status bar beside a corner element only on an iPhone The status bar goes for the iPhone Duo's status capsule; an iPad's window controls give the same corner signal and no longer hide its bar. The corner insets still reach the page on every device. --- client/ios/App/App/TrekBridgeViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/ios/App/App/TrekBridgeViewController.swift b/client/ios/App/App/TrekBridgeViewController.swift index 3fb43d6c1..8d1a07bcb 100644 --- a/client/ios/App/App/TrekBridgeViewController.swift +++ b/client/ios/App/App/TrekBridgeViewController.swift @@ -121,7 +121,7 @@ class TrekBridgeViewController: CAPBridgeViewController { right: max(0, safe.right - (window.bounds.maxX - frame.maxX)) ) let corner = cornerElement(in: frame, window: window) - if corner != .zero, cornerWindowSizes.insert(sizeKey(window.bounds.size)).inserted { + if corner != .zero, UIDevice.current.model == "iPhone", cornerWindowSizes.insert(sizeKey(window.bounds.size)).inserted { setNeedsStatusBarAppearanceUpdate() } if !force, insets == publishedSafeArea, corner == publishedCorner { return } @@ -151,7 +151,8 @@ class TrekBridgeViewController: CAPBridgeViewController { /// once seen: with the bar hidden the next measure may find no corner, and /// showing the bar again would bring the capsule back and start over. The /// folded and the unfolded display differ in size, so each keeps its own - /// answer, and a device without such an element never hides its bar. + /// answer, and a device without such an element never hides its bar. Only + /// on an iPhone: an iPad's window controls are such an element as well. private var cornerWindowSizes = Set() private func sizeKey(_ size: CGSize) -> String {