From fea7145ac9dc72532b7e343bc5f3a044a7cb6fd3 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Wed, 4 Jan 2023 17:27:43 +0800 Subject: [PATCH] The mention is hidden *inside* spoiler text --- src/components/status.jsx | 43 ++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 2ea6d926..ce555c45 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -94,6 +94,7 @@ function Status({ filtered, card, createdAt, + inReplyToId, inReplyToAccountId, content, mentions, @@ -279,26 +280,30 @@ function Status({ ))} - {inReplyToAccountId && !withinContext && size !== 's' && ( - <> - {inReplyToAccountId === status.account.id ? ( -
- - Thread -
- ) : ( - !!inReplyToAccount && - !mentions.find((mention) => { - return mention.id === inReplyToAccountId; - }) && ( -
- {' '} - + {!!inReplyToId && + !!inReplyToAccountId && + !withinContext && + size !== 's' && ( + <> + {inReplyToAccountId === status.account.id ? ( +
+ + Thread
- ) - )} - - )} + ) : ( + !!inReplyToAccount && + (!!spoilerText || + !mentions.find((mention) => { + return mention.id === inReplyToAccountId; + })) && ( +
+ {' '} + +
+ ) + )} + + )}