Skip to content

Commit e26426a

Browse files
committed
refactor: removed isContentHeightFixed shared value
1 parent ab97f77 commit e26426a

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

src/components/bottomSheet/BottomSheet.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
224224
const isAnimatedOnMount = useSharedValue(
225225
!animateOnMount || _providedIndex === -1
226226
);
227-
const isContentHeightFixed = useSharedValue(false);
228227
const isLayoutCalculated = useDerivedValue(() => {
229228
let isContainerHeightCalculated = false;
230229
const { containerHeight, handleHeight } = animatedLayoutState.get();
@@ -1352,7 +1351,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
13521351
animatedSnapPoints,
13531352
animatedHighestSnapPoint,
13541353
isInTemporaryPosition,
1355-
isContentHeightFixed,
13561354
simultaneousHandlers: _providedSimultaneousHandlers,
13571355
waitFor: _providedWaitFor,
13581356
activeOffsetX: _providedActiveOffsetX,
@@ -1380,7 +1378,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
13801378
animatedScrollableState,
13811379
animatedScrollableStatus,
13821380
animatedSnapPoints,
1383-
isContentHeightFixed,
13841381
isInTemporaryPosition,
13851382
enableContentPanningGesture,
13861383
overDragResistanceFactor,

src/contexts/internal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export interface BottomSheetInternalContextType
5353
animatedSheetHeight: SharedValue<number>;
5454
animatedHighestSnapPoint: SharedValue<number>;
5555
animatedClosedPosition: SharedValue<number>;
56-
isContentHeightFixed: SharedValue<boolean>;
5756
isInTemporaryPosition: SharedValue<boolean>;
5857

5958
// methods

src/hooks/useScrollableSetter.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ export const useScrollableSetter = (
1414
useFocusHook = useEffect
1515
) => {
1616
// hooks
17-
const {
18-
animatedScrollableState,
19-
isContentHeightFixed,
20-
setScrollableRef,
21-
removeScrollableRef,
22-
} = useBottomSheetInternal();
17+
const { animatedScrollableState, setScrollableRef, removeScrollableRef } =
18+
useBottomSheetInternal();
2319

2420
// callbacks
2521
const handleSettingScrollable = useCallback(() => {
@@ -31,8 +27,6 @@ export const useScrollableSetter = (
3127
refreshable,
3228
}));
3329

34-
isContentHeightFixed.value = false;
35-
3630
// set current scrollable ref
3731
const id = findNodeHandle(ref.current);
3832
if (id) {
@@ -52,7 +46,6 @@ export const useScrollableSetter = (
5246
type,
5347
refreshable,
5448
contentOffsetY,
55-
isContentHeightFixed,
5649
animatedScrollableState,
5750
setScrollableRef,
5851
removeScrollableRef,

0 commit comments

Comments
 (0)