From ad75a7864f2f5cdeddd906f105fe0564d7610c1b Mon Sep 17 00:00:00 2001 From: Chiri Vulpes Date: Thu, 30 Jan 2025 21:50:47 +1300 Subject: [PATCH] Fix modifications to notifications unread count not persisting through refresh --- src/model/Notifications.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/model/Notifications.ts b/src/model/Notifications.ts index 56cd0ef..ad83bea 100644 --- a/src/model/Notifications.ts +++ b/src/model/Notifications.ts @@ -121,7 +121,11 @@ namespace Notifications { unreadCount.value += read ? -modifiedCount : modifiedCount - Store.items.notifications = { ...Store.items.notifications, cache: simpleCache } + Store.items.notifications = { + ...Store.items.notifications, + cache: simpleCache, + unreadCount: unreadCount.value, + } for (const page of cache.pages) if (Array.isArray(page.value) && page.value.some(n => ids.includes(n.id))) page.emit()