Fix compact thread status not showing badge when there's no thread number

This commit is contained in:
Lim Chee Aun 2023-04-02 16:04:37 +08:00
parent 85e4a27a6b
commit 62af5dbf64

View file

@ -559,13 +559,17 @@ function TimelineStatusCompact({ status, instance }) {
const sKey = statusKey(id, instance);
return (
<article class="status compact-thread" tabindex="-1">
{!!snapStates.statusThreadNumber[sKey] && (
{!!snapStates.statusThreadNumber[sKey] ? (
<div class="status-thread-badge">
<Icon icon="thread" size="s" />
{snapStates.statusThreadNumber[sKey]
? ` ${snapStates.statusThreadNumber[sKey]}/X`
: ''}
</div>
) : (
<div class="status-thread-badge">
<Icon icon="thread" size="s" />
</div>
)}
<div class="content-compact" title={statusPeekText}>
{statusPeekText}