Only show reply badge if not inside mentions

This commit is contained in:
Lim Chee Aun 2022-12-24 01:22:25 +08:00
parent f8fac1294b
commit 55ad4be580

View file

@ -273,25 +273,24 @@ function Status({
))} ))}
</div> </div>
{inReplyToAccountId && !withinContext && size !== 's' && ( {inReplyToAccountId && !withinContext && size !== 's' && (
<div
class={`status-${
inReplyToAccountId === status.account.id ? 'thread' : 'reply'
}-badge`}
>
{inReplyToAccountId === status.account.id ? (
<> <>
{inReplyToAccountId === status.account.id ? (
<div class="status-thread-badge">
<Icon icon="thread" size="s" /> <Icon icon="thread" size="s" />
Thread Thread
</> </div>
) : ( ) : (
!!inReplyToAccount && ( !!inReplyToAccount &&
<> !mentions.find((mention) => {
return mention.id === inReplyToAccountId;
}) && (
<div class="status-reply-badge">
<Icon icon="reply" />{' '} <Icon icon="reply" />{' '}
<NameText account={inReplyToAccount} short /> <NameText account={inReplyToAccount} short />
</> </div>
) )
)} )}
</div> </>
)} )}
<div <div
class={`content-container ${ class={`content-container ${