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
This commit is contained in:
xmflsct 2023-01-11 21:11:43 +01:00
parent f93fe09783
commit e31ce3772a
1 changed files with 8 additions and 8 deletions

View File

@ -346,13 +346,6 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
}
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<RootStackScreenProps<'Screen-Compose'>> = ({
// })
// 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()