about summary refs log tree commit diff
path: root/src/state/models/feeds/notifications.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-08-05 11:29:55 -0700
committerGitHub <noreply@github.com>2023-08-05 11:29:55 -0700
commit89fc975a150d8c1f79d2a728f9f252fc3438a613 (patch)
tree251887b1eb13fbbeac74b0b4a43bbba2376fe0b2 /src/state/models/feeds/notifications.ts
parentd53cbb91bb91fe3da360c22b2dbd966b9bc39a83 (diff)
downloadvoidsky-89fc975a150d8c1f79d2a728f9f252fc3438a613.tar.zst
Perf: switch to stable react keys (#1113)
Diffstat (limited to 'src/state/models/feeds/notifications.ts')
-rw-r--r--src/state/models/feeds/notifications.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/state/models/feeds/notifications.ts b/src/state/models/feeds/notifications.ts
index 5f170062d..4bf23590b 100644
--- a/src/state/models/feeds/notifications.ts
+++ b/src/state/models/feeds/notifications.ts
@@ -23,8 +23,6 @@ const PAGE_SIZE = 30
 const MS_1HR = 1e3 * 60 * 60
 const MS_2DAY = MS_1HR * 48
 
-let _idCounter = 0
-
 export const MAX_VISIBLE_NOTIFS = 30
 
 export interface GroupedNotification extends ListNotifications.Notification {
@@ -573,7 +571,7 @@ export class NotificationsFeedModel {
     for (const item of items) {
       const itemModel = new NotificationsFeedItemModel(
         this.rootStore,
-        `item-${_idCounter++}`,
+        `notification-${item.uri}`,
         item,
       )
       const uri = itemModel.additionalDataUri