Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

hailey/filter dupe labels (#5984)

authored by

Hailey and committed by
GitHub
bdb57226 93a53162

+6 -2
+6 -2
src/view/com/composer/labels/LabelsBtn.tsx
··· 34 34 const updateAdultLabels = (newLabels: AdultSelfLabel[]) => { 35 35 const newLabel = newLabels[newLabels.length - 1] 36 36 const filtered = labels.filter(l => !ADULT_CONTENT_LABELS.includes(l)) 37 - onChange([...filtered, newLabel].filter(Boolean) as SelfLabel[]) 37 + onChange([ 38 + ...new Set([...filtered, newLabel].filter(Boolean) as SelfLabel[]), 39 + ]) 38 40 } 39 41 40 42 const updateOtherLabels = (newLabels: OtherSelfLabel[]) => { 41 43 const newLabel = newLabels[newLabels.length - 1] 42 44 const filtered = labels.filter(l => !OTHER_SELF_LABELS.includes(l)) 43 - onChange([...filtered, newLabel].filter(Boolean) as SelfLabel[]) 45 + onChange([ 46 + ...new Set([...filtered, newLabel].filter(Boolean) as SelfLabel[]), 47 + ]) 44 48 } 45 49 46 50 return (