From 65e22ea81940445c05bec6acd676bde78b0147e6 Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
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 (
                       <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}