diff --git a/src/view/shell/desktop/Search.tsx b/src/view/shell/desktop/Search.tsx index 92eeb5ea11..92fe056464 100644 --- a/src/view/shell/desktop/Search.tsx +++ b/src/view/shell/desktop/Search.tsx @@ -30,7 +30,6 @@ import {precacheProfile} from 'state/queries/profile' import {Link} from '#/view/com/util/Link' import {UserAvatar} from '#/view/com/util/UserAvatar' import {Text} from 'view/com/util/text/Text' -import {useThrottledValue} from '#/components/hooks/useThrottledValue' export const MATCH_HANDLE = /@?([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*(?:\.[a-zA-Z]{2,}))/ @@ -152,12 +151,10 @@ export function DesktopSearch() { const navigation = useNavigation() const [isActive, setIsActive] = React.useState(false) const [query, setQuery] = React.useState('') - const throttledInput = useThrottledValue(query, 300) const {data: autocompleteData, isFetching} = useActorAutocompleteQuery( - throttledInput, + query, true, ) - const isLoading = isFetching && !autocompleteData?.length const moderationOpts = useModerationOpts() @@ -232,7 +229,7 @@ export function DesktopSearch() { {query !== '' && isActive && moderationOpts && ( - {isLoading ? ( + {isFetching && !autocompleteData?.length ? (