From eebb55ba38f7a29bd51b84c66aa1e52c6ee2abb5 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 8 Apr 2023 19:47:54 +0800 Subject: [PATCH] Only show replies count if ancestors is a thread --- src/pages/status.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/status.jsx b/src/pages/status.jsx index fa53703c..d7f5c7ba 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -142,6 +142,9 @@ function StatusPage() { skipThreading: true, }); }); + const ancestorsIsThread = ancestors.every( + (s) => s.account.id === heroStatus.account.id, + ); const nestedDescendants = []; descendants.forEach((status) => { saveStatus(status, instance, { @@ -184,6 +187,7 @@ function StatusPage() { ...ancestors.map((s) => ({ id: s.id, ancestor: true, + isThread: ancestorsIsThread, accountID: s.account.id, repliesCount: s.repliesCount, })), @@ -625,6 +629,7 @@ function StatusPage() { const { id: statusID, ancestor, + isThread, descendant, thread, replies, @@ -731,7 +736,7 @@ function StatusPage() { size={thread || ancestor ? 'm' : 's'} enableTranslate /> - {ancestor && !!repliesCount && ( + {ancestor && isThread && !!repliesCount && (