diff options
Diffstat (limited to 'src/components/FeedInterstitials.tsx')
-rw-r--r-- | src/components/FeedInterstitials.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/FeedInterstitials.tsx b/src/components/FeedInterstitials.tsx index 243db0a49..53c1fac0b 100644 --- a/src/components/FeedInterstitials.tsx +++ b/src/components/FeedInterstitials.tsx @@ -13,6 +13,7 @@ import {logger} from '#/logger' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useGetPopularFeedsQuery} from '#/state/queries/feed' import {useProfilesQuery} from '#/state/queries/profile' +import {useSession} from '#/state/session' import {useProgressGuide} from '#/state/shell/progress-guide' import * as userActionHistory from '#/state/userActionHistory' import {SeenPost} from '#/state/userActionHistory' @@ -127,6 +128,7 @@ function sortSeenPosts(postA: SeenPost, postB: SeenPost): 0 | 1 | -1 { } function useExperimentalSuggestedUsersQuery() { + const {currentAccount} = useSession() const userActionSnapshot = userActionHistory.useActionHistorySnapshot() const dids = React.useMemo(() => { const {likes, follows, seen} = userActionSnapshot @@ -138,8 +140,10 @@ function useExperimentalSuggestedUsersQuery() { .sort(sortSeenPosts) .map(l => new AtUri(l.uri)) .map(uri => uri.host) - return [...new Set([...likeDids, ...seenDids])] - }, [userActionSnapshot]) + return [...new Set([...likeDids, ...seenDids])].filter( + did => did !== currentAccount?.did, + ) + }, [userActionSnapshot, currentAccount]) const {data, isLoading, error} = useProfilesQuery({ handles: dids.slice(0, 16), }) |