diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-09-25 14:58:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 14:58:53 +0100 |
commit | bd393b1b387eeddff33a520f60f04387c9105379 (patch) | |
tree | 89bd98b303842a8376ddb7aeadf090d0314508dc /src/view/com/util/List.tsx | |
parent | 850cfc1cd567bf36c3c2ba9dfd92fb579e8e52bc (diff) | |
download | voidsky-bd393b1b387eeddff33a520f60f04387c9105379.tar.zst |
Allow profile header to overscroll (#5457)
* add allowoverscroll prop * ensure spinner is visible * more generic prop for `<List>` * rename to allowHeaderOverScroll
Diffstat (limited to 'src/view/com/util/List.tsx')
-rw-r--r-- | src/view/com/util/List.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index f9aeae1a8..53b0547d4 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -4,11 +4,11 @@ import {runOnJS, useSharedValue} from 'react-native-reanimated' import {updateActiveVideoViewAsync} from '@haileyok/bluesky-video' import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED' -import {usePalette} from '#/lib/hooks/usePalette' +import {useDedupe} from '#/lib/hooks/useDedupe' import {useScrollHandlers} from '#/lib/ScrollContext' -import {useDedupe} from 'lib/hooks/useDedupe' -import {addStyle} from 'lib/styles' -import {isIOS} from 'platform/detection' +import {addStyle} from '#/lib/styles' +import {isIOS} from '#/platform/detection' +import {useTheme} from '#/alf' import {FlatList_INTERNAL} from './Views' export type ListMethods = FlatList_INTERNAL @@ -44,12 +44,13 @@ function ListImpl<ItemT>( onItemSeen, headerOffset, style, + progressViewOffset, ...props }: ListProps<ItemT>, ref: React.Ref<ListMethods>, ) { const isScrolledDown = useSharedValue(false) - const pal = usePalette('default') + const t = useTheme() const dedupe = useDedupe(400) function handleScrolledDownChange(didScrollDown: boolean) { @@ -120,9 +121,9 @@ function ListImpl<ItemT>( <RefreshControl refreshing={refreshing ?? false} onRefresh={onRefresh} - tintColor={pal.colors.text} - titleColor={pal.colors.text} - progressViewOffset={headerOffset} + tintColor={t.atoms.text.color} + titleColor={t.atoms.text.color} + progressViewOffset={progressViewOffset ?? headerOffset} /> ) } |