diff --git a/src/view/com/pager/PagerWithHeader.tsx b/src/view/com/pager/PagerWithHeader.tsx index b52ce2da0d..5b40a48ec7 100644 --- a/src/view/com/pager/PagerWithHeader.tsx +++ b/src/view/com/pager/PagerWithHeader.tsx @@ -1,5 +1,11 @@ import * as React from 'react' -import {LayoutChangeEvent, StyleSheet, View} from 'react-native' +import { + FlatList, + LayoutChangeEvent, + ScrollView, + StyleSheet, + View, +} from 'react-native' import Animated, { useAnimatedReaction, useAnimatedScrollHandler, @@ -18,7 +24,7 @@ interface PagerWithHeaderChildParams { headerHeight: number onScroll: OnScrollCb isScrolledDown: boolean - scrollElRef: any /* TODO */ + scrollElRef: React.MutableRefObject | ScrollView | null> } export interface PagerWithHeaderProps { diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx index 223917f6b5..3365885604 100644 --- a/src/view/screens/ProfileFeed.tsx +++ b/src/view/screens/ProfileFeed.tsx @@ -1,5 +1,11 @@ import React, {useMemo, useCallback} from 'react' -import {Dimensions, StyleSheet, View, ActivityIndicator} from 'react-native' +import { + Dimensions, + StyleSheet, + View, + ActivityIndicator, + FlatList, +} from 'react-native' import {NativeStackScreenProps} from '@react-navigation/native-stack' import {useNavigation} from '@react-navigation/native' import {usePalette} from 'lib/hooks/usePalette' @@ -349,7 +355,9 @@ export const ProfileFeedScreenInner = observer( onScroll={onScroll} headerHeight={headerHeight} isScrolledDown={isScrolledDown} - scrollElRef={scrollElRef} + scrollElRef={ + scrollElRef as React.MutableRefObject | null> + } /> )} {({onScroll, headerHeight, scrollElRef}) => ( @@ -360,7 +368,9 @@ export const ProfileFeedScreenInner = observer( headerHeight={headerHeight} onToggleLiked={onToggleLiked} onScroll={onScroll} - scrollElRef={scrollElRef} + scrollElRef={ + scrollElRef as React.MutableRefObject + } /> )} @@ -388,7 +398,7 @@ interface FeedSectionProps { onScroll: OnScrollCb headerHeight: number isScrolledDown: boolean - scrollElRef: any /* TODO */ + scrollElRef: React.MutableRefObject | null> } const FeedSection = React.forwardRef( function FeedSectionImpl( @@ -447,7 +457,7 @@ const AboutSection = observer(function AboutPageImpl({ headerHeight: number onToggleLiked: () => void onScroll: OnScrollCb - scrollElRef: any /* TODO */ + scrollElRef: React.MutableRefObject }) { const pal = usePalette('default') const {_} = useLingui() diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 1f24be9658..7e2fd05c58 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -1,5 +1,11 @@ import React, {useCallback, useMemo} from 'react' -import {ActivityIndicator, Pressable, StyleSheet, View} from 'react-native' +import { + ActivityIndicator, + FlatList, + Pressable, + StyleSheet, + View, +} from 'react-native' import {useFocusEffect} from '@react-navigation/native' import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import {useNavigation} from '@react-navigation/native' @@ -172,7 +178,9 @@ export const ProfileListScreenInner = observer( {({onScroll, headerHeight, isScrolledDown, scrollElRef}) => ( | null> + } feed={feed} onScroll={onScroll} headerHeight={headerHeight} @@ -182,7 +190,9 @@ export const ProfileListScreenInner = observer( {({onScroll, headerHeight, isScrolledDown, scrollElRef}) => ( | null> + } list={list} descriptionRT={list.descriptionRT} creator={list.data ? list.data.creator : undefined} @@ -222,7 +232,9 @@ export const ProfileListScreenInner = observer( {({onScroll, headerHeight, isScrolledDown, scrollElRef}) => ( | null> + } descriptionRT={list.descriptionRT} creator={list.data ? list.data.creator : undefined} isCurateList={list.isCuratelist} @@ -554,7 +566,7 @@ interface FeedSectionProps { onScroll: OnScrollCb headerHeight: number isScrolledDown: boolean - scrollElRef: any /* TODO */ + scrollElRef: React.MutableRefObject | null> } const FeedSection = React.forwardRef( function FeedSectionImpl( @@ -608,7 +620,7 @@ interface AboutSectionProps { onScroll: OnScrollCb headerHeight: number isScrolledDown: boolean - scrollElRef: any /* TODO */ + scrollElRef: React.MutableRefObject | null> } const AboutSection = React.forwardRef( function AboutSectionImpl(