From fceec83e085fddf5fe804cb281b66dda7519db9f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 14 Oct 2025 15:40:32 -0500 Subject: [PATCH] isLastSiblingByCounts isn't needed, should rely only on the count of replies seen --- src/state/queries/usePostThread/traversal.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/state/queries/usePostThread/traversal.ts b/src/state/queries/usePostThread/traversal.ts index 19cb522cd5..5c84e1c815 100644 --- a/src/state/queries/usePostThread/traversal.ts +++ b/src/state/queries/usePostThread/traversal.ts @@ -266,15 +266,6 @@ export function sortAndAnnotateThreadItems( if (nextItem?.type === 'threadPost') metadata.nextItemDepth = nextItem?.depth - /* - * Item is the last "sibling" if we know for sure we're out of - * replies on the parent (even though this item itself may have its - * own reply branches). - */ - const isLastSiblingByCounts = - metadata.replyIndex === - metadata.parentMetadata.repliesIndexCounter - 1 - /** * Item is also the last "sibling" if its index matches the total * number of replies we're actually able to render to the page. @@ -298,9 +289,7 @@ export function sortAndAnnotateThreadItems( * Ok now we can set the last sibling state. */ metadata.isLastSibling = - isLastSiblingByCounts || - isImplicitlyLastSibling || - isLastSiblingDueToMissingReplies + isImplicitlyLastSibling || isLastSiblingDueToMissingReplies /* * Item is the last "child" in a branch if there is no next item,