@@ -26,9 +26,9 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
2626 animatedAnimationState,
2727 animatedScrollableContentOffsetY : rootScrollableContentOffsetY ,
2828 isScrollableLocked,
29+ isScrollEnded,
2930 } = useBottomSheetInternal ( ) ;
3031 const awaitingFirstScroll = useSharedValue ( false ) ;
31- const scrollEnded = useSharedValue ( false ) ;
3232 const _lockableScrollableContentOffsetY = useSharedValue ( 0 ) ;
3333
3434 useAnimatedReaction (
@@ -74,7 +74,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
7474 }
7575
7676 if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
77- if ( ! ( preserveScrollMomentum && scrollEnded . value ) ) {
77+ if ( ! ( preserveScrollMomentum && isScrollEnded . value ) ) {
7878 const lockPosition = context . shouldLockInitialPosition
7979 ? context . initialContentOffsetY ?? 0
8080 : 0 ;
@@ -103,7 +103,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
103103 rootScrollableContentOffsetY . value = y ;
104104 context . initialContentOffsetY = y ;
105105 awaitingFirstScroll . value = true ;
106- scrollEnded . value = false ;
106+ isScrollEnded . value = false ;
107107
108108 if ( scrollBuffer ) {
109109 if ( y <= 0 && (
@@ -152,7 +152,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
152152 useWorkletCallback (
153153 ( { contentOffset : { y } } , context ) => {
154154 awaitingFirstScroll . value = false ;
155- scrollEnded . value = true ;
155+ isScrollEnded . value = true ;
156156 if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
157157 const lockPosition = context . shouldLockInitialPosition
158158 ? context . initialContentOffsetY ?? 0
@@ -181,7 +181,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
181181 useWorkletCallback (
182182 ( { contentOffset : { y } } , context ) => {
183183 if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
184- if ( ! ( preserveScrollMomentum && scrollEnded . value ) ) {
184+ if ( ! ( preserveScrollMomentum && isScrollEnded . value ) ) {
185185 const lockPosition = context . shouldLockInitialPosition
186186 ? context . initialContentOffsetY ?? 0
187187 : 0 ;
0 commit comments