An ATproto social media client -- with an independent Appview.

Filter yourself out of follows interstitial (#4770)

authored by

Eric Bailey and committed by
GitHub
ea0586cd 15a00b18

+6 -2
+6 -2
src/components/FeedInterstitials.tsx
··· 13 13 import {useModerationOpts} from '#/state/preferences/moderation-opts' 14 14 import {useGetPopularFeedsQuery} from '#/state/queries/feed' 15 15 import {useProfilesQuery} from '#/state/queries/profile' 16 + import {useSession} from '#/state/session' 16 17 import {useProgressGuide} from '#/state/shell/progress-guide' 17 18 import * as userActionHistory from '#/state/userActionHistory' 18 19 import {SeenPost} from '#/state/userActionHistory' ··· 127 128 } 128 129 129 130 function useExperimentalSuggestedUsersQuery() { 131 + const {currentAccount} = useSession() 130 132 const userActionSnapshot = userActionHistory.useActionHistorySnapshot() 131 133 const dids = React.useMemo(() => { 132 134 const {likes, follows, seen} = userActionSnapshot ··· 138 140 .sort(sortSeenPosts) 139 141 .map(l => new AtUri(l.uri)) 140 142 .map(uri => uri.host) 141 - return [...new Set([...likeDids, ...seenDids])] 142 - }, [userActionSnapshot]) 143 + return [...new Set([...likeDids, ...seenDids])].filter( 144 + did => did !== currentAccount?.did, 145 + ) 146 + }, [userActionSnapshot, currentAccount]) 143 147 const {data, isLoading, error} = useProfilesQuery({ 144 148 handles: dids.slice(0, 16), 145 149 })