Fix an issue that caused the feed to rearrange on loadmore

zio/stable
Paul Frazee 2023-01-17 10:58:51 -06:00
parent e5ec07b919
commit 050df83db7
1 changed files with 2 additions and 1 deletions

View File

@ -439,6 +439,7 @@ export class FeedModel {
) {
this.loadMoreCursor = res.data.cursor
this.hasMore = !!this.loadMoreCursor
const orgLen = this.feed.length
const reorgedFeed = preprocessFeed(res.data.feed)
@ -458,7 +459,7 @@ export class FeedModel {
this.feed = this.feed.concat(toAppend)
}
dedupReposts(this.feed)
dedupParents(this.feed)
dedupParents(this.feed.slice(orgLen)) // we slice to avoid modifying rendering of already-shown posts
})
}