From f9f4dcfca5984cbcb10abc9da41e7dba8cb32c39 Mon Sep 17 00:00:00 2001 From: Rishi Balakrishnan Date: Tue, 6 Oct 2026 15:05:50 -0400 Subject: [PATCH] fix(bottom-sheet): match upstream maxHeight default and comment Align with bluesky-social/social-app#11104 so the file is identical to upstream's fix and merges cleanly. --- modules/bottom-sheet/ios/SheetView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/bottom-sheet/ios/SheetView.swift b/modules/bottom-sheet/ios/SheetView.swift index b403f692b..1c6e963aa 100644 --- a/modules/bottom-sheet/ios/SheetView.swift +++ b/modules/bottom-sheet/ios/SheetView.swift @@ -32,7 +32,10 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate { var cornerRadius: CGFloat? var sourceViewTag: Int? var minHeight = 0.0 - var maxHeight: CGFloat = 0 { + // getScreenHeight() is nil when no window scene is connected yet (e.g. during + // prewarming or a background launch). A nil here previously trapped in + // clampHeight, so fall back to the full screen bounds instead. + var maxHeight: CGFloat = UIScreen.main.bounds.height { didSet { let screenHeight = Util.getScreenHeight() ?? UIScreen.main.bounds.height if maxHeight > screenHeight { -- knotmirror 0.0.1