Bluesky app fork with some witchin' additions 💫

fix first sheet height change not registering (#8267)

authored by samuel.fm and committed by

GitHub b1550f9c dba0bd83

+11 -7
+2 -1
modules/bottom-sheet/ios/SheetView.swift
··· 144 144 } 145 145 146 146 func updateLayout() { 147 - if self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier, 147 + // Allow updates either when identifiers match OR when prevLayoutDetentIdentifier is nil (first real content update) 148 + if (self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier || self.prevLayoutDetentIdentifier == nil), 148 149 let contentHeight = self.innerView?.subviews.first?.frame.size.height { 149 150 self.sheetVc?.updateDetents(contentHeight: self.clampHeight(contentHeight), 150 151 preventExpansion: self.preventExpansion)
+8 -5
modules/bottom-sheet/src/BottomSheetNativeComponent.tsx
··· 1 1 import * as React from 'react' 2 2 import { 3 3 Dimensions, 4 - LayoutChangeEvent, 5 - NativeSyntheticEvent, 4 + type LayoutChangeEvent, 5 + type NativeSyntheticEvent, 6 6 Platform, 7 - StyleProp, 7 + type StyleProp, 8 8 View, 9 - ViewStyle, 9 + type ViewStyle, 10 10 } from 'react-native' 11 11 import {useSafeAreaInsets} from 'react-native-safe-area-context' 12 12 import {requireNativeModule, requireNativeViewManager} from 'expo-modules-core' 13 13 14 14 import {isIOS} from '#/platform/detection' 15 - import {BottomSheetState, BottomSheetViewProps} from './BottomSheet.types' 15 + import { 16 + type BottomSheetState, 17 + type BottomSheetViewProps, 18 + } from './BottomSheet.types' 16 19 import {BottomSheetPortalProvider} from './BottomSheetPortal' 17 20 import {Context as PortalContext} from './BottomSheetPortal' 18 21
+1 -1
modules/bottom-sheet/src/BottomSheetNativeComponent.web.tsx
··· 1 - import {BottomSheetViewProps} from './BottomSheet.types' 1 + import {type BottomSheetViewProps} from './BottomSheet.types' 2 2 3 3 export function BottomSheetNativeComponent(_: BottomSheetViewProps) { 4 4 throw new Error('BottomSheetNativeComponent is not available on web')