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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 289 additions and 83 deletions

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>
)}