From 050df83db7d83252c0ab5c7e6b0c531d003640d0 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 17 Jan 2023 10:58:51 -0600 Subject: [PATCH] Fix an issue that caused the feed to rearrange on loadmore --- src/state/models/feed-view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 5f8fc98f..5697108a 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -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 }) }