Migrate useScrollViewOffset to useScrollOffset

This commit is contained in:
Tomek Zawadzki
2026-07-23 22:23:26 +02:00
parent a53df16e82
commit ce7c2a0894
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ interface SortableListProps<T> {
itemHeight: number
/** Ref to the parent Animated.ScrollView for auto-scroll. */
scrollRef?: AnimatedRef<Animated.ScrollView>
/** Scroll offset shared value from useScrollViewOffset. */
/** Scroll offset shared value from useScrollOffset. */
scrollOffset?: SharedValue<number>
}
+1 -1
View File
@@ -22,7 +22,7 @@ interface SortableListProps<T> {
itemHeight: number
/** Ref to the parent Animated.ScrollView for auto-scroll. Ignored on web. */
scrollRef?: AnimatedRef<Animated.ScrollView>
/** Scroll offset shared value from useScrollViewOffset. Ignored on web. */
/** Scroll offset shared value from useScrollOffset. Ignored on web. */
scrollOffset?: SharedValue<number>
}
+2 -2
View File
@@ -1,7 +1,7 @@
import {useState} from 'react'
import {View} from 'react-native'
import type Animated from 'react-native-reanimated'
import {useAnimatedRef, useScrollViewOffset} from 'react-native-reanimated'
import {useAnimatedRef, useScrollOffset} from 'react-native-reanimated'
import {type AppBskyActorDefs} from '@atproto/api'
import {TID} from '@atproto/common-web'
import {msg} from '@lingui/core/macro'
@@ -69,7 +69,7 @@ function SavedFeedsInner({
useOverwriteSavedFeedsMutation()
const navigation = useNavigation<NavigationProp>()
const scrollRef = useAnimatedRef<Animated.ScrollView>()
const scrollOffset = useScrollViewOffset(scrollRef)
const scrollOffset = useScrollOffset(scrollRef)
/*
* Use optimistic data if exists and no error, otherwise fallback to remote