Skip to content

Commit

Permalink
move indicatorStyle to List (#7526)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius authored Jan 21, 2025
1 parent f5b277c commit f0cc831
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const Content = React.memo(function Content({
contentContainerStyle,
...props
}: ContentProps) {
const t = useTheme()
const {footerHeight} = useShellLayout()
const animatedProps = useAnimatedProps(() => {
return {
Expand All @@ -73,6 +74,7 @@ export const Content = React.memo(function Content({
<Animated.ScrollView
id="content"
automaticallyAdjustsScrollIndicatorInsets={false}
indicatorStyle={t.scheme === 'dark' ? 'white' : 'black'}
// sets the scroll inset to the height of the footer
animatedProps={animatedProps}
style={[scrollViewStyles.common, style]}
Expand Down
1 change: 0 additions & 1 deletion src/components/StarterPack/ProfileStarterPacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export const ProfileStarterPacks = React.forwardRef<
headerOffset={headerOffset}
progressViewOffset={ios(0)}
contentContainerStyle={{paddingBottom: headerOffset + bottomBarOffset}}
indicatorStyle={t.name === 'light' ? 'black' : 'white'}
removeClippedSubviews={true}
desktopFixedHeight
onEndReached={onEndReached}
Expand Down
2 changes: 0 additions & 2 deletions src/view/com/feeds/ProfileFeedgens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ export const ProfileFeedgens = React.forwardRef<
headerOffset={headerOffset}
progressViewOffset={ios(0)}
contentContainerStyle={isMobile && {paddingBottom: headerOffset + 100}}
indicatorStyle={t.name === 'light' ? 'black' : 'white'}
removeClippedSubviews={true}
// @ts-ignore our .web version only -prf
desktopFixedHeight
onEndReached={onEndReached}
/>
Expand Down
2 changes: 0 additions & 2 deletions src/view/com/lists/ProfileLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
contentContainerStyle={
isMobile && {paddingBottom: headerOffset + 100}
}
indicatorStyle={t.name === 'light' ? 'black' : 'white'}
removeClippedSubviews={true}
// @ts-ignore our .web version only -prf
desktopFixedHeight
onEndReached={onEndReached}
/>
Expand Down
3 changes: 0 additions & 3 deletions src/view/com/posts/PostFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -187,7 +186,6 @@ let PostFeed = ({
initialNumToRender?: number
isVideoFeed?: boolean
}): React.ReactNode => {
const theme = useTheme()
const {_} = useLingui()
const queryClient = useQueryClient()
const {currentAccount, hasSession} = useSession()
Expand Down Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions src/view/com/util/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ let List = React.forwardRef<ListMethods, ListProps>(
right: 1,
...props.scrollIndicatorInsets,
}}
indicatorStyle={t.scheme === 'dark' ? 'white' : 'black'}
contentOffset={contentOffset}
refreshControl={refreshControl}
onScroll={scrollHandler}
Expand Down

0 comments on commit f0cc831

Please sign in to comment.