Filter out of suggested follows

This commit is contained in:
Eric Bailey
2024-03-19 11:56:33 -05:00
parent daf0ba9481
commit ecb08afa05
2 changed files with 6 additions and 3 deletions
@@ -98,9 +98,11 @@ export function ProfileHeaderSuggestedFollows({
<SuggestedFollowSkeleton /> <SuggestedFollowSkeleton />
</> </>
) : data ? ( ) : data ? (
data.suggestions.map(profile => ( data.suggestions
<SuggestedFollow key={profile.did} profile={profile} /> .filter(s => (s.associated?.labeler ? false : true))
)) .map(profile => (
<SuggestedFollow key={profile.did} profile={profile} />
))
) : ( ) : (
<View /> <View />
)} )}
+1
View File
@@ -141,6 +141,7 @@ function SearchScreenSuggestedFollows() {
friends.slice(0, 4).map(friend => friends.slice(0, 4).map(friend =>
getSuggestedFollowsByActor(friend.did).then(foafsRes => { getSuggestedFollowsByActor(friend.did).then(foafsRes => {
for (const user of foafsRes.suggestions) { for (const user of foafsRes.suggestions) {
if (user.associated?.labeler) continue
friendsOfFriends.set(user.did, user) friendsOfFriends.set(user.did, user)
} }
}), }),