From 016ea33e2634368796f5d42e40729e58b2f08c70 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 17 Apr 2023 23:12:29 +0200 Subject: [PATCH] A bit more tolerant of local search --- src/screens/Compose/index.tsx | 2 -- src/utils/queryHooks/search.ts | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/screens/Compose/index.tsx b/src/screens/Compose/index.tsx index d5453df1..d6bd605b 100644 --- a/src/screens/Compose/index.tsx +++ b/src/screens/Compose/index.tsx @@ -11,7 +11,6 @@ import { RootStackScreenProps } from '@utils/navigation/navigators' import { useInstanceQuery } from '@utils/queryHooks/instance' import { usePreferencesQuery } from '@utils/queryHooks/preferences' import { searchLocalStatus } from '@utils/queryHooks/search' -import { useTimelineMutation } from '@utils/queryHooks/timeline' import { getAccountStorage, getGlobalStorage, @@ -220,7 +219,6 @@ const ScreenCompose: React.FC> = ({ } return false } - const mutateTimeline = useTimelineMutation({ onMutate: true }) const inputProps: EmojisState['inputProps'] = [ { diff --git a/src/utils/queryHooks/search.ts b/src/utils/queryHooks/search.ts index 4f0ca471..49c4f6e2 100644 --- a/src/utils/queryHooks/search.ts +++ b/src/utils/queryHooks/search.ts @@ -60,7 +60,7 @@ export const searchLocalStatus = async ( staleTime: 3600, cacheTime: 3600, retry: false, - ...(timeout && { meta: { timeout: 1000 } }) + ...(timeout && { meta: { timeout: 1500 } }) }) .then(res => res.statuses[0]?.uri === uri || res.statuses[0]?.url === uri @@ -79,7 +79,7 @@ export const searchLocalAccount = async ( staleTime: 3600, cacheTime: 3600, retry: false, - ...(timeout && { meta: { timeout: 1000 } }) + ...(timeout && { meta: { timeout: 1500 } }) }) .then(res => (res.accounts[0].url === url ? res.accounts[0] : Promise.reject())) }