From 65e22ea81940445c05bec6acd676bde78b0147e6 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 9 Apr 2023 11:40:35 +0800 Subject: [PATCH] Further compact-ify threads/conversations with spoilers --- src/components/timeline.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 25a76aab..f9c0cbce 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -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 (
  • - {manyItems && isMiddle && type === 'thread' ? ( + {showCompact ? (