Update comments

This commit is contained in:
Eric Bailey
2025-10-14 10:08:07 -05:00
parent 8d4ce43301
commit b928e27c18
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -135,10 +135,10 @@ export function sortAndAnnotateThreadItems(
} else if (AppBskyUnspeccedDefs.isThreadItemPost(item.value)) {
if (parentMetadata) {
/*
* Set this value before incrementing the parent's repliesSeenCounter
* Set this value before incrementing the `repliesIndexCounter`, since
* `repliesIndexCounter` is 1-indexed and `replyIndex` is 0-indexed.
*/
metadata!.replyIndex = parentMetadata.repliesIndexCounter
// Increment the parent's repliesIndexCounter
parentMetadata.repliesIndexCounter += 1
}
@@ -193,7 +193,7 @@ export function sortAndAnnotateThreadItems(
storeTraversalMetadata(metadatas, childMetadata)
if (childParentMetadata) {
/*
* Set this value before incrementing the parent's
* Set this value before incrementing the
* `repliesIndexCounter`, since `repliesIndexCounter` is
* 1-indexed and `replyIndex` is 0-indexed.
*/
+6 -6
View File
@@ -201,9 +201,9 @@ export type TraversalMetadata = {
* After traversal, we can use this to calculate if we actually got all the
* replies we expected, or if some were blocked, etc.
*
* Because this value is incremented startging from 0, it is 1-indexed. So to
* when comparing to the `replyIndex`, you'll need to subtract 1 from this
* value.
* Note: this is a "counter", not an "index". Because this value is
* incremented starting from 0, it is 1-indexed. So to when comparing to the
* `replyIndex`, you'll need to subtract 1 from this value.
*/
repliesSeenCounter: number
/**
@@ -211,9 +211,9 @@ export type TraversalMetadata = {
* for populating the `replyIndex` of the post by referencing this value on
* the parent.
*
* Because this value is incremented startging from 0, it is 1-indexed. So to
* when comparing to the `replyIndex`, you'll need to subtract 1 from this
* value.
* Note: this is a "counter", not an "index". Because this value is
* incremented starting from 0, it is 1-indexed. So to when comparing to the
* `replyIndex`, you'll need to subtract 1 from this value.
*/
repliesIndexCounter: number
/**