diff --git a/src/screens/Tabs/Shared/Toot.tsx b/src/screens/Tabs/Shared/Toot.tsx index 5566f806..7876e6fc 100644 --- a/src/screens/Tabs/Shared/Toot.tsx +++ b/src/screens/Tabs/Shared/Toot.tsx @@ -258,6 +258,18 @@ const TabSharedToot: React.FC> = ({ } }) }) + } else { + queryClient.cancelQueries(queryKey.local) + queryClient.setQueryData(queryKey.local, old => { + return old?.map(local => { + const remoteMatch = data.find(remote => remote.uri === local.uri) + if (remoteMatch) { + return { ...local, ...updateCounts(remoteMatch) } + } else { + return local + } + }) + }) } }, onSettled: async () => {