diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-10 15:34:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 15:34:25 -0800 |
commit | c8c308e31e63607280648e3e9f1f56a371adcd05 (patch) | |
tree | 09cea4c603968a1a0b4cab299af9a417880c8115 /src/view/com/testing/TestCtrls.e2e.tsx | |
parent | 51f04b96200e38d95e486628d3cbc43398c47980 (diff) | |
download | voidsky-c8c308e31e63607280648e3e9f1f56a371adcd05.tar.zst |
Refactor feeds to use react-query (#1862)
* Update to react-query v5 * Introduce post-feed react query * Add feed refresh behaviors * Only fetch feeds of visible pages * Implement polling for latest on feeds * Add moderation filtering to slices * Handle block errors * Update feed error messages * Remove old models * Replace simple-feed option with disable-tuner option * Add missing useMemo * Implement the mergefeed and fixes to polling * Correctly handle failed load more state * Improve error and empty state behaviors * Clearer naming
Diffstat (limited to 'src/view/com/testing/TestCtrls.e2e.tsx')
-rw-r--r-- | src/view/com/testing/TestCtrls.e2e.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/testing/TestCtrls.e2e.tsx b/src/view/com/testing/TestCtrls.e2e.tsx index 489705d10..5e9d816ac 100644 --- a/src/view/com/testing/TestCtrls.e2e.tsx +++ b/src/view/com/testing/TestCtrls.e2e.tsx @@ -3,6 +3,7 @@ import {Pressable, View} from 'react-native' import {useStores} from 'state/index' import {navigate} from '../../../Navigation' import {useModalControls} from '#/state/modals' +import {useQueryClient} from '@tanstack/react-query' import {useSessionApi} from '#/state/session' /** @@ -15,6 +16,7 @@ const BTN = {height: 1, width: 1, backgroundColor: 'red'} export function TestCtrls() { const store = useStores() + const queryClient = useQueryClient() const {logout, login} = useSessionApi() const {openModal} = useModalControls() const onPressSignInAlice = async () => { @@ -83,7 +85,7 @@ export function TestCtrls() { /> <Pressable testID="e2eRefreshHome" - onPress={() => store.me.mainFeed.refresh()} + onPress={() => queryClient.invalidateQueries({queryKey: ['post-feed']})} accessibilityRole="button" style={BTN} /> |