mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fxied #353
This commit is contained in:
@@ -30,18 +30,10 @@ const TabSharedAccount: React.FC<
|
||||
|
||||
const scrollY = useSharedValue(0)
|
||||
|
||||
const onScroll = useCallback(({ nativeEvent }) => {
|
||||
scrollY.value = nativeEvent.contentOffset.y
|
||||
}, [])
|
||||
|
||||
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>([
|
||||
'Timeline',
|
||||
{ page: 'Account_Default', account: account.id }
|
||||
])
|
||||
const renderItem = useCallback(
|
||||
({ item }) => <TimelineDefault item={item} queryKey={queryKey} />,
|
||||
[]
|
||||
)
|
||||
const isFetchingTimeline = useIsFetching(queryKey)
|
||||
const fetchedTimeline = useRef(false)
|
||||
useEffect(() => {
|
||||
@@ -97,8 +89,11 @@ const TabSharedAccount: React.FC<
|
||||
queryKey={queryKey}
|
||||
disableRefresh
|
||||
customProps={{
|
||||
renderItem,
|
||||
onScroll,
|
||||
renderItem: ({ item }) => (
|
||||
<TimelineDefault item={item} queryKey={queryKey} />
|
||||
),
|
||||
onScroll: ({ nativeEvent }) =>
|
||||
(scrollY.value = nativeEvent.contentOffset.y),
|
||||
ListHeaderComponent,
|
||||
maintainVisibleContentPosition: undefined
|
||||
}}
|
||||
|
Reference in New Issue
Block a user