···307307 metadata.isPartOfLastBranchFromDepth = metadata.depth
308308309309 /**
310310- * If the parent is part of the last branch of the sub-tree, so is the child.
310310+ * If the parent is part of the last branch of the sub-tree, so
311311+ * is the child. However, if the child is also a last sibling,
312312+ * then we need to start tracking `isPartOfLastBranchFromDepth`
313313+ * from this point onwards, always updating it to the depth of
314314+ * the last sibling as we go down.
311315 */
312312- if (metadata.parentMetadata.isPartOfLastBranchFromDepth) {
316316+ if (
317317+ !metadata.isLastSibling &&
318318+ metadata.parentMetadata.isPartOfLastBranchFromDepth
319319+ ) {
313320 metadata.isPartOfLastBranchFromDepth =
314321 metadata.parentMetadata.isPartOfLastBranchFromDepth
315322 }
+2-2
src/state/queries/usePostThread/types.ts
···151151 */
152152 isLastChild: boolean
153153 /**
154154- * Indicates if the post is the left/lower-most branch of the reply tree.
155155- * Value corresponds to the depth at which this branch started.
154154+ * Indicates if the post is the left-most AND lower-most branch of the reply
155155+ * tree. Value corresponds to the depth at which this branch started.
156156 */
157157 isPartOfLastBranchFromDepth?: number
158158 /**