@@ -26,9 +26,9 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
26
26
animatedAnimationState,
27
27
animatedScrollableContentOffsetY : rootScrollableContentOffsetY ,
28
28
isScrollableLocked,
29
+ isScrollEnded,
29
30
} = useBottomSheetInternal ( ) ;
30
31
const awaitingFirstScroll = useSharedValue ( false ) ;
31
- const scrollEnded = useSharedValue ( false ) ;
32
32
const _lockableScrollableContentOffsetY = useSharedValue ( 0 ) ;
33
33
34
34
useAnimatedReaction (
@@ -74,7 +74,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
74
74
}
75
75
76
76
if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
77
- if ( ! ( preserveScrollMomentum && scrollEnded . value ) ) {
77
+ if ( ! ( preserveScrollMomentum && isScrollEnded . value ) ) {
78
78
const lockPosition = context . shouldLockInitialPosition
79
79
? context . initialContentOffsetY ?? 0
80
80
: 0 ;
@@ -103,7 +103,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
103
103
rootScrollableContentOffsetY . value = y ;
104
104
context . initialContentOffsetY = y ;
105
105
awaitingFirstScroll . value = true ;
106
- scrollEnded . value = false ;
106
+ isScrollEnded . value = false ;
107
107
108
108
if ( scrollBuffer ) {
109
109
if ( y <= 0 && (
@@ -152,7 +152,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
152
152
useWorkletCallback (
153
153
( { contentOffset : { y } } , context ) => {
154
154
awaitingFirstScroll . value = false ;
155
- scrollEnded . value = true ;
155
+ isScrollEnded . value = true ;
156
156
if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
157
157
const lockPosition = context . shouldLockInitialPosition
158
158
? context . initialContentOffsetY ?? 0
@@ -181,7 +181,7 @@ export const useScrollEventsHandlersDefault: ScrollEventsHandlersHookType = (
181
181
useWorkletCallback (
182
182
( { contentOffset : { y } } , context ) => {
183
183
if ( animatedScrollableState . value === SCROLLABLE_STATE . LOCKED ) {
184
- if ( ! ( preserveScrollMomentum && scrollEnded . value ) ) {
184
+ if ( ! ( preserveScrollMomentum && isScrollEnded . value ) ) {
185
185
const lockPosition = context . shouldLockInitialPosition
186
186
? context . initialContentOffsetY ?? 0
187
187
: 0 ;
0 commit comments