From f0cc83154b7e0d26af4a0c44c0fe78a9589d3f93 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 21 Jan 2025 21:36:09 +0000 Subject: move indicatorStyle to `List` (#7526) --- src/components/Layout/index.tsx | 2 ++ src/components/StarterPack/ProfileStarterPacks.tsx | 1 - src/view/com/feeds/ProfileFeedgens.tsx | 2 -- src/view/com/lists/ProfileLists.tsx | 2 -- src/view/com/posts/PostFeed.tsx | 3 --- src/view/com/util/List.tsx | 1 + 6 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 8532cbbb4..489ebb225 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -58,6 +58,7 @@ export const Content = React.memo(function Content({ contentContainerStyle, ...props }: ContentProps) { + const t = useTheme() const {footerHeight} = useShellLayout() const animatedProps = useAnimatedProps(() => { return { @@ -73,6 +74,7 @@ export const Content = React.memo(function Content({ diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index 2f63fd172..d91a4fb66 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -203,9 +203,7 @@ export const ProfileLists = React.forwardRef( contentContainerStyle={ isMobile && {paddingBottom: headerOffset + 100} } - indicatorStyle={t.name === 'light' ? 'black' : 'white'} removeClippedSubviews={true} - // @ts-ignore our .web version only -prf desktopFixedHeight onEndReached={onEndReached} /> diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index 67ecfa25a..0afc7f61a 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -18,7 +18,6 @@ import {DISCOVER_FEED_URI, KNOWN_SHUTDOWN_FEEDS} from '#/lib/constants' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {logEvent} from '#/lib/statsig/statsig' -import {useTheme} from '#/lib/ThemeContext' import {logger} from '#/logger' import {isIOS, isNative, isWeb} from '#/platform/detection' import {listenPostCreated} from '#/state/events' @@ -187,7 +186,6 @@ let PostFeed = ({ initialNumToRender?: number isVideoFeed?: boolean }): React.ReactNode => { - const theme = useTheme() const {_} = useLingui() const queryClient = useQueryClient() const {currentAccount, hasSession} = useSession() @@ -715,7 +713,6 @@ let PostFeed = ({ minHeight: Dimensions.get('window').height * 1.5, }} onScrolledDownChange={onScrolledDownChange} - indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'} onEndReached={onEndReached} onEndReachedThreshold={2} // number of posts left to trigger load more removeClippedSubviews={true} diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index 41ca5b572..28f21d039 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -164,6 +164,7 @@ let List = React.forwardRef( right: 1, ...props.scrollIndicatorInsets, }} + indicatorStyle={t.scheme === 'dark' ? 'white' : 'black'} contentOffset={contentOffset} refreshControl={refreshControl} onScroll={scrollHandler} -- cgit 1.4.1