This commit is contained in:
hailey 2025-05-08 08:49:43 -07:00 committed by GitHub
parent a260ecd307
commit a6455b3de3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,7 +145,7 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate {
func updateLayout() {
// Allow updates either when identifiers match OR when prevLayoutDetentIdentifier is nil (first real content update)
if (self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier || self.prevLayoutDetentIdentifier == nil),
if self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier || self.prevLayoutDetentIdentifier == nil,
let contentHeight = self.innerView?.subviews.first?.frame.size.height {
self.sheetVc?.updateDetents(contentHeight: self.clampHeight(contentHeight),
preventExpansion: self.preventExpansion)
@ -155,9 +155,15 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate {
}
func dismiss() {
guard let sheetVc = self.sheetVc else {
return
}
self.isClosing = true
self.sheetVc?.dismiss(animated: true) { [weak self] in
self?.destroy()
DispatchQueue.main.async {
sheetVc.dismiss(animated: true) { [weak self] in
self?.destroy()
}
}
}