Further compact-ify threads/conversations with spoilers

This commit is contained in:
Lim Chee Aun 2023-04-09 11:40:35 +08:00
parent f9217ac16f
commit 65e22ea819

View file

@ -383,6 +383,10 @@ function Timeline({
? `/${instance}/s/${statusID}`
: `/s/${statusID}`;
const isMiddle = i > 0 && i < items.length - 1;
const isSpoiler = item.sensitive && !!item.spoilerText;
const showCompact =
(isSpoiler && i > 0) ||
(manyItems && isMiddle && type === 'thread');
return (
<li
key={`timeline-${statusID}`}
@ -395,7 +399,7 @@ function Timeline({
}`}
>
<Link class="status-link timeline-item" to={url}>
{manyItems && isMiddle && type === 'thread' ? (
{showCompact ? (
<TimelineStatusCompact
status={item}
instance={instance}