Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

precache recent profile click (#7831)

authored by

Samuel Newman and committed by
GitHub
3d954a00 f9392d4a

+8 -2
+8 -2
src/view/screens/Search/Search.tsx
··· 18 18 import {msg, Trans} from '@lingui/macro' 19 19 import {useLingui} from '@lingui/react' 20 20 import {useFocusEffect, useNavigation, useRoute} from '@react-navigation/native' 21 + import {useQueryClient} from '@tanstack/react-query' 21 22 22 23 import {APP_LANGUAGES, LANGUAGES} from '#/lib/../locale/languages' 23 24 import {createHitslop, HITSLOP_20} from '#/lib/constants' ··· 42 43 import {useActorAutocompleteQuery} from '#/state/queries/actor-autocomplete' 43 44 import {useActorSearch} from '#/state/queries/actor-search' 44 45 import {usePopularFeedsSearch} from '#/state/queries/feed' 45 - import {useProfilesQuery} from '#/state/queries/profile' 46 + import { 47 + unstableCacheProfileView, 48 + useProfilesQuery, 49 + } from '#/state/queries/profile' 46 50 import {useSearchPostsQuery} from '#/state/queries/search-posts' 47 51 import {useSession} from '#/state/session' 48 52 import {useSetMinimalShellMode} from '#/state/shell' ··· 622 626 const {_} = useLingui() 623 627 const setMinimalShellMode = useSetMinimalShellMode() 624 628 const {currentAccount} = useSession() 629 + const queryClient = useQueryClient() 625 630 626 631 // Query terms 627 632 const [searchText, setSearchText] = React.useState<string>(queryParam) ··· 768 773 769 774 const handleProfileClick = React.useCallback( 770 775 (profile: bsky.profile.AnyProfileView) => { 776 + unstableCacheProfileView(queryClient, profile) 771 777 // Slight delay to avoid updating during push nav animation. 772 778 setTimeout(() => { 773 779 updateProfileHistory(profile) 774 780 }, 400) 775 781 }, 776 - [updateProfileHistory], 782 + [updateProfileHistory, queryClient], 777 783 ) 778 784 779 785 const onSoftReset = React.useCallback(() => {