1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 07:34:06 +01:00

A bit more tolerant of local search

This commit is contained in:
xmflsct 2023-04-17 23:12:29 +02:00
parent 824730bc40
commit 016ea33e26
2 changed files with 2 additions and 4 deletions

View File

@ -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<RootStackScreenProps<'Screen-Compose'>> = ({
}
return false
}
const mutateTimeline = useTimelineMutation({ onMutate: true })
const inputProps: EmojisState['inputProps'] = [
{

View File

@ -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()))
}