diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-10-05 16:44:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 16:44:05 -0700 |
commit | bd7db8af26bfbf94a80972671ca714a143bee28e (patch) | |
tree | cf022bddc4f6b164bea51aeb3c57479d72b73355 /src/view/com/profile/ProfileHeaderSuggestedFollows.tsx | |
parent | 19f8389fc777c7ff41466748f1238f4e0a4b0619 (diff) | |
download | voidsky-bd7db8af26bfbf94a80972671ca714a143bee28e.tar.zst |
Improve typeahead search with inclusion of followed users (temporary solution) (#1612)
* Update follows cache to maintain some user info * Prioritize follows in composer autocomplete * Clean up logic and add new autocomplete to search * Update follow hook
Diffstat (limited to 'src/view/com/profile/ProfileHeaderSuggestedFollows.tsx')
-rw-r--r-- | src/view/com/profile/ProfileHeaderSuggestedFollows.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx b/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx index b9d66a6fe..41e4022d5 100644 --- a/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx +++ b/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx @@ -19,7 +19,7 @@ import {useStores} from 'state/index' import {usePalette} from 'lib/hooks/usePalette' import {Text} from 'view/com/util/text/Text' import {UserAvatar} from 'view/com/util/UserAvatar' -import {useFollowDid} from 'lib/hooks/useFollowDid' +import {useFollowProfile} from 'lib/hooks/useFollowProfile' import {Button} from 'view/com/util/forms/Button' import {sanitizeDisplayName} from 'lib/strings/display-names' import {sanitizeHandle} from 'lib/strings/handles' @@ -83,7 +83,7 @@ export function ProfileHeaderSuggestedFollows({ return [] } - store.me.follows.hydrateProfiles(suggestions) + store.me.follows.hydrateMany(suggestions) return suggestions } catch (e) { @@ -218,7 +218,7 @@ const SuggestedFollow = observer(function SuggestedFollowImpl({ const {track} = useAnalytics() const pal = usePalette('default') const store = useStores() - const {following, toggle} = useFollowDid({did: profile.did}) + const {following, toggle} = useFollowProfile(profile) const moderation = moderateProfile(profile, store.preferences.moderationOpts) const onPress = React.useCallback(async () => { |