feat: hide content mentioning muted users (#524)

Co-authored-by: mleku <me@mleku.dev>
This commit is contained in:
Cody Tseng
2025-09-02 22:18:34 +08:00
committed by GitHub
parent d3578184fb
commit 3c657dfa8c
37 changed files with 289 additions and 83 deletions

View File

@@ -108,6 +108,7 @@ export default function ProfileFeed({
subRequests={subRequests}
showKinds={temporaryShowKinds}
hideReplies={listMode === 'posts'}
filterMutedNotes={false}
/>
</>
)

View File

@@ -31,7 +31,7 @@ export default function Profile({ id }: { id?: string }) {
const { push } = useSecondaryPage()
const { profile, isFetching } = useFetchProfile(id)
const { pubkey: accountPubkey } = useNostr()
const { mutePubkeys } = useMuteList()
const { mutePubkeySet } = useMuteList()
const { followings } = useFetchFollowings(profile?.pubkey)
const isFollowingYou = useMemo(() => {
return (
@@ -176,7 +176,7 @@ export default function Profile({ id }: { id?: string }) {
<Relays pubkey={pubkey} />
{isSelf && (
<SecondaryPageLink to={toMuteList()} className="flex gap-1 hover:underline w-fit">
{mutePubkeys.length}
{mutePubkeySet.size}
<div className="text-muted-foreground">{t('Muted')}</div>
</SecondaryPageLink>
)}