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.
This commit is contained in:
Maurice
2026-11-23 14:53:18 +01:00
parent bd215b7ec7
commit b6006c8265
@@ -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<String>()
private func sizeKey(_ size: CGSize) -> String {