about summary refs log tree commit diff
path: root/src/lib/api
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-08-08 11:34:19 -0700
committerGitHub <noreply@github.com>2023-08-08 11:34:19 -0700
commit3c29a1be4d1bd9fb707cb05a8464ca7a094dd8e0 (patch)
tree9684c4a1c7e015d3cc40894c87fa2eeb7e651f54 /src/lib/api
parent872a7f93f4a2d1b0fe5050f85984f3b7d5215eae (diff)
downloadvoidsky-3c29a1be4d1bd9fb707cb05a8464ca7a094dd8e0.tar.zst
Fix to react-key uniqueness in feeds (#1136)
Diffstat (limited to 'src/lib/api')
-rw-r--r--src/lib/api/feed-manip.ts6
1 files changed, 6 insertions, 0 deletions
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