about summary refs log tree commit diff
path: root/src/components/StarterPack/Main/ProfilesList.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-07-02 19:50:04 -0700
committerGitHub <noreply@github.com>2024-07-03 03:50:04 +0100
commit6694a33603544511441474819216d51482d19827 (patch)
tree3f393e3598ec4f9928d637b179ed2307d2b3daf4 /src/components/StarterPack/Main/ProfilesList.tsx
parentdc3c81c4e2923e0ab884adf119bd33c510db1f4a (diff)
downloadvoidsky-6694a33603544511441474819216d51482d19827.tar.zst
Don't follow self, blocks or mute when following all; don't show blocks in list (#4715)
* don't follow self when following all

* also filter blocks

* add more filtering to follow all

* extract logic to functions
Diffstat (limited to 'src/components/StarterPack/Main/ProfilesList.tsx')
-rw-r--r--src/components/StarterPack/Main/ProfilesList.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/StarterPack/Main/ProfilesList.tsx b/src/components/StarterPack/Main/ProfilesList.tsx
index 7691e7222..0cc911d66 100644
--- a/src/components/StarterPack/Main/ProfilesList.tsx
+++ b/src/components/StarterPack/Main/ProfilesList.tsx
@@ -9,6 +9,7 @@ import {
 import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query'
 
 import {useBottomBarOffset} from 'lib/hooks/useBottomBarOffset'
+import {isBlockedOrBlocking} from 'lib/moderation/blocked-and-muted'
 import {isNative, isWeb} from 'platform/detection'
 import {useSession} from 'state/session'
 import {List, ListRef} from 'view/com/util/List'
@@ -47,7 +48,7 @@ export const ProfilesList = React.forwardRef<SectionRef, ProfilesListProps>(
     // The server returns these sorted by descending creation date, so we want to invert
     const profiles = data?.pages
       .flatMap(p => p.items.map(i => i.subject))
-      .filter(p => !p.associated?.labeler)
+      .filter(p => !isBlockedOrBlocking(p) && !p.associated?.labeler)
       .reverse()
     const isOwn = new AtUri(listUri).host === currentAccount?.did