diff options
author | dan <dan.abramov@gmail.com> | 2023-12-14 02:48:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 18:48:20 -0800 |
commit | 7fd79702371e3d7829be2188c2212c090bf76670 (patch) | |
tree | dd2e7543284a5a0d43e2c371feefe465fabf3d1c /src/view/com/lists/MyLists.tsx | |
parent | fa3ccafa8028933f11802eace3dca6f6dc7c4dba (diff) | |
download | voidsky-7fd79702371e3d7829be2188c2212c090bf76670.tar.zst |
Make scroll handling contextual (#2200)
* Add an intermediate List component * Fix type * Add onScrolledDownChange * Port pager to use onScrolledDownChange * Fix on mobile * Don't pass down onScroll (replacement TBD) * Remove resetMainScroll * Replace onMainScroll with MainScrollProvider * Hook ScrollProvider to pager * Fix the remaining special case * Optimize a bit * Enforce that onScroll cannot be passed * Keep value updated even if no handler * Also memo it
Diffstat (limited to 'src/view/com/lists/MyLists.tsx')
-rw-r--r-- | src/view/com/lists/MyLists.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/view/com/lists/MyLists.tsx b/src/view/com/lists/MyLists.tsx index b46d34ba5..586ad234e 100644 --- a/src/view/com/lists/MyLists.tsx +++ b/src/view/com/lists/MyLists.tsx @@ -15,7 +15,7 @@ import {ErrorMessage} from '../util/error/ErrorMessage' import {Text} from '../util/text/Text' import {useAnalytics} from 'lib/analytics/analytics' import {usePalette} from 'lib/hooks/usePalette' -import {FlatList} from '../util/Views' +import {List} from '../util/List' import {s} from 'lib/styles' import {logger} from '#/logger' import {Trans} from '@lingui/macro' @@ -119,7 +119,7 @@ export function MyLists({ [error, onRefresh, renderItem, pal], ) - const FlatListCom = inline ? RNFlatList : FlatList + const FlatListCom = inline ? RNFlatList : List return ( <View testID={testID} style={style}> {items.length > 0 && ( |