about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-06-24 17:07:29 -0700
committerGitHub <noreply@github.com>2024-06-24 17:07:29 -0700
commitdd5198f317fb722f348560f0b0dbe805553ae83b (patch)
tree08d27593e9dcb4431c40a609e113daff276ea5e0
parent340c2c5eaf4666bd064f69d3520e7bc2b6cfa8c2 (diff)
downloadvoidsky-dd5198f317fb722f348560f0b0dbe805553ae83b.tar.zst
explicitly filter out labelers (#4629)
-rw-r--r--src/components/StarterPack/Main/ProfilesList.tsx1
-rw-r--r--src/screens/StarterPack/StarterPackLandingScreen.tsx35
-rw-r--r--src/screens/StarterPack/Wizard/StepProfiles.tsx7
3 files changed, 25 insertions, 18 deletions
diff --git a/src/components/StarterPack/Main/ProfilesList.tsx b/src/components/StarterPack/Main/ProfilesList.tsx
index 72d35fe2b..7691e7222 100644
--- a/src/components/StarterPack/Main/ProfilesList.tsx
+++ b/src/components/StarterPack/Main/ProfilesList.tsx
@@ -47,6 +47,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)
       .reverse()
     const isOwn = new AtUri(listUri).host === currentAccount?.did
 
diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx
index a7bc451b7..2b450494b 100644
--- a/src/screens/StarterPack/StarterPackLandingScreen.tsx
+++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx
@@ -239,22 +239,25 @@ function LandingScreenLoaded({
                       t.atoms.border_contrast_low,
                     ]
                   }>
-                  {starterPack.listItemsSample?.slice(0, 8).map((item, i) => (
-                    <View
-                      key={item.subject.did}
-                      style={[
-                        a.py_lg,
-                        a.px_md,
-                        (!isTabletOrDesktop || i !== 0) && a.border_t,
-                        t.atoms.border_contrast_low,
-                        {pointerEvents: 'none'},
-                      ]}>
-                      <ProfileCard
-                        profile={item.subject}
-                        moderationOpts={moderationOpts}
-                      />
-                    </View>
-                  ))}
+                  {starterPack.listItemsSample
+                    ?.filter(p => !p.subject.associated?.labeler)
+                    .slice(0, 8)
+                    .map((item, i) => (
+                      <View
+                        key={item.subject.did}
+                        style={[
+                          a.py_lg,
+                          a.px_md,
+                          (!isTabletOrDesktop || i !== 0) && a.border_t,
+                          t.atoms.border_contrast_low,
+                          {pointerEvents: 'none'},
+                        ]}>
+                        <ProfileCard
+                          profile={item.subject}
+                          moderationOpts={moderationOpts}
+                        />
+                      </View>
+                    ))}
                 </View>
               </View>
             )}
diff --git a/src/screens/StarterPack/Wizard/StepProfiles.tsx b/src/screens/StarterPack/Wizard/StepProfiles.tsx
index 33caa12f2..f77a46e7a 100644
--- a/src/screens/StarterPack/Wizard/StepProfiles.tsx
+++ b/src/screens/StarterPack/Wizard/StepProfiles.tsx
@@ -38,10 +38,13 @@ export function StepProfiles({
   } = useActorSearchPaginated({
     query: encodeURIComponent('*'),
   })
-  const topFollowers = topPages?.pages.flatMap(p => p.actors)
+  const topFollowers = topPages?.pages
+    .flatMap(p => p.actors)
+    .filter(p => !p.associated?.labeler)
 
-  const {data: results, isFetching: isFetchingResults} =
+  const {data: resultsUnfiltered, isFetching: isFetchingResults} =
     useActorAutocompleteQuery(query, true, 12)
+  const results = resultsUnfiltered?.filter(p => !p.associated?.labeler)
 
   const isLoading = isLoadingTopPages || isFetchingResults