From 00866fd73a98287201877171a0f8f7850783cd1d Mon Sep 17 00:00:00 2001 From: codytseng Date: Thu, 5 Jun 2025 17:02:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=92=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Note/Highlight.tsx | 2 +- src/components/PostEditor/PostTextarea/index.tsx | 2 +- src/components/ReplyNoteList/index.tsx | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/Note/Highlight.tsx b/src/components/Note/Highlight.tsx index 80cd93f2..bc2a9706 100644 --- a/src/components/Note/Highlight.tsx +++ b/src/components/Note/Highlight.tsx @@ -102,7 +102,7 @@ function HighlightSource({ event }: { event: Event }) { return (
-
{t('From')}
+
{t('From')}
{pubkey && } {referenceEvent && isSupportedKind(referenceEvent.kind) ? ( + {t('Edit')} {t('Preview')} diff --git a/src/components/ReplyNoteList/index.tsx b/src/components/ReplyNoteList/index.tsx index 16022778..0ba09c8a 100644 --- a/src/components/ReplyNoteList/index.tsx +++ b/src/components/ReplyNoteList/index.tsx @@ -251,7 +251,14 @@ export default function ReplyNoteList({
{replies.slice(0, showCount).map((reply) => { if (!isUserTrusted(reply.pubkey)) { - return null + const repliesForThisReply = repliesMap.get(reply.id) + // If the reply is not trusted and there are no trusted replies for this reply, skip rendering + if ( + !repliesForThisReply || + repliesForThisReply.events.every((evt) => !isUserTrusted(evt.pubkey)) + ) { + return null + } } const parentEventTag = getParentEventTag(reply)