diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 22438fc797..cf43d2055f 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -141,6 +141,10 @@ function PostThreadLoaded({ ) const [maxVisible, setMaxVisible] = React.useState(100) const [isPTRing, setIsPTRing] = React.useState(false) + const treeView = React.useMemo( + () => !!threadViewPrefs.lab_treeViewEnabled && hasBranchingReplies(thread), + [threadViewPrefs, thread], + ) // construct content const posts = React.useMemo(() => { @@ -289,7 +293,7 @@ function PostThreadLoaded({ 0 const isThreadedChildAdjacentTop = - isThreadedChild && prevPost?.ctx.depth === depth + isThreadedChild && prevPost?.ctx.depth === depth && depth !== 1 const isThreadedChildAdjacentBot = isThreadedChild && nextPost?.ctx.depth === depth return ( - {Array.from(Array(depth)).map((_, n: number) => ( + {Array.from(Array(depth - 1)).map((_, n: number) => ( ))}