Fix to thread ordering in the feed: correctly identify the starts of threads when adjacent
parent
ae3099dfca
commit
e99eb7bfad
|
@ -601,7 +601,11 @@ function preprocessFeed(feed: FeedItem[]): FeedItemWithThreadMeta[] {
|
||||||
} else {
|
} else {
|
||||||
if (!item._isThreadChild) {
|
if (!item._isThreadChild) {
|
||||||
threadSlices.push({index: activeSlice, length: i - activeSlice})
|
threadSlices.push({index: activeSlice, length: i - activeSlice})
|
||||||
activeSlice = -1
|
if (item._isThreadParent) {
|
||||||
|
activeSlice = i
|
||||||
|
} else {
|
||||||
|
activeSlice = -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -630,7 +634,6 @@ function preprocessFeed(feed: FeedItem[]): FeedItemWithThreadMeta[] {
|
||||||
if (slice.length > 3) {
|
if (slice.length > 3) {
|
||||||
reorg.splice(slice.index - removedCount + 1, slice.length - 3)
|
reorg.splice(slice.index - removedCount + 1, slice.length - 3)
|
||||||
reorg[slice.index - removedCount]._isThreadChildElided = true
|
reorg[slice.index - removedCount]._isThreadChildElided = true
|
||||||
console.log(reorg[slice.index - removedCount])
|
|
||||||
removedCount += slice.length - 3
|
removedCount += slice.length - 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue