diff --git a/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetModule.kt b/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetModule.kt index 6e3630d570..c6d8823b42 100644 --- a/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetModule.kt +++ b/modules/bottom-sheet/android/src/main/java/expo/modules/bottomsheet/BottomSheetModule.kt @@ -25,10 +25,6 @@ class BottomSheetModule : Module() { view.dismiss() } - AsyncFunction("updateLayout") { view: BottomSheetView -> - view.updateLayout() - } - Prop("disableDrag") { view: BottomSheetView, prop: Boolean -> view.disableDrag = prop } diff --git a/modules/bottom-sheet/ios/BottomSheetModule.swift b/modules/bottom-sheet/ios/BottomSheetModule.swift index 2269fbd910..ee0d180617 100644 --- a/modules/bottom-sheet/ios/BottomSheetModule.swift +++ b/modules/bottom-sheet/ios/BottomSheetModule.swift @@ -19,10 +19,6 @@ public class BottomSheetModule: Module { view.dismiss() } - AsyncFunction("updateLayout") { (view: SheetView) in - view.updateLayout() - } - Prop("cornerRadius") { (view: SheetView, prop: Float) in view.cornerRadius = CGFloat(prop) } diff --git a/modules/bottom-sheet/ios/SheetView.swift b/modules/bottom-sheet/ios/SheetView.swift index 320b58a5dd..2f38053125 100644 --- a/modules/bottom-sheet/ios/SheetView.swift +++ b/modules/bottom-sheet/ios/SheetView.swift @@ -71,7 +71,6 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate { } } } - private var prevLayoutDetentIdentifier: UISheetPresentationController.Detent.Identifier? // MARK: - Lifecycle @@ -186,17 +185,6 @@ 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, - let contentHeight = self.innerView?.subviews.first?.frame.size.height { - self.sheetVc?.updateDetents(contentHeight: self.clampHeight(contentHeight), - preventExpansion: self.preventExpansion) - self.selectedDetentIdentifier = self.sheetVc?.getCurrentDetentIdentifier() - } - self.prevLayoutDetentIdentifier = self.selectedDetentIdentifier - } - func dismiss() { guard let sheetVc = self.sheetVc else { return diff --git a/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx b/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx index 0cba53f3b7..451ba6a388 100644 --- a/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx +++ b/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx @@ -71,10 +71,6 @@ export class BottomSheetNativeComponent extends React.Component< this.props.onStateChange?.(event) } - private updateLayout = () => { - this.ref.current?.updateLayout() - } - static dismissAll = async () => { await NativeModule.dismissAll() }