From e31ce3772aa9df88157ac96dd61aea5871263356 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 11 Jan 2023 21:11:43 +0100 Subject: [PATCH] Do not auto refetch home timeline Due to the new timeline position feature, auto refetch would shift the timeline and the user is not at the newest of the list anyway --- src/screens/Compose/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/screens/Compose/index.tsx b/src/screens/Compose/index.tsx index 5c6e6f10..abb56f77 100644 --- a/src/screens/Compose/index.tsx +++ b/src/screens/Compose/index.tsx @@ -346,13 +346,6 @@ const ScreenCompose: React.FC> = ({ } switch (params?.type) { - case undefined: - queryClient.invalidateQueries({ - queryKey: ['Timeline', { page: 'Following' }], - exact: false - }) - break - case 'conversation': case 'edit': // doesn't work // mutateTimeline.mutate({ // type: 'editItem', @@ -361,11 +354,18 @@ const ScreenCompose: React.FC> = ({ // }) // break case 'deleteEdit': - case 'reply': for (const navState of params.navigationState) { navState && queryClient.invalidateQueries(navState) } break + case 'conversation': + case 'reply': + for (const navState of params.navigationState) { + navState && + navState[1].page !== 'Following' && + queryClient.invalidateQueries(navState) + } + break } removeDraft(composeState.timestamp) navigation.goBack()