From 3c29a1be4d1bd9fb707cb05a8464ca7a094dd8e0 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 8 Aug 2023 11:34:19 -0700 Subject: Fix to react-key uniqueness in feeds (#1136) --- src/lib/api/feed-manip.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/api/feed-manip.ts') diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index f4bf6cdff..d2bbb4e83 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -17,6 +17,12 @@ export class FeedViewPostsSlice { constructor(public items: FeedViewPost[] = []) {} + get _reactKey() { + return `slice-${this.rootItem.post.uri}-${ + this.rootItem.reason?.indexedAt || this.rootItem.post.indexedAt + }` + } + get uri() { if (this.isFlattenedReply) { return this.items[1].post.uri -- cgit 1.4.1