diff options
-rw-r--r-- | src/state/models/feed-view.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 6a23654fd..18b3e4c1a 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -520,10 +520,11 @@ export class FeedModel { private _updateAll(res: GetTimeline.Response | GetAuthorFeed.Response) { for (const item of res.data.feed) { const existingItem = this.feed.find( - // this find function has a key subtley- the indexedAt comparison - // the reason for this is reposts: they set the URI of the original post, not of the repost record - // the indexedAt time will be for the repost however, so we use that to help us - item2 => item.uri === item2.uri && item.indexedAt === item2.indexedAt, + // HACK: need to find the reposts and trends item, so we have to check for that -prf + item2 => + item.uri === item2.uri && + item.repostedBy?.did === item2.repostedBy?.did && + item.trendedBy?.did === item2.trendedBy?.did, ) if (existingItem) { existingItem.copy(item) |