Skip to content

Commit

Permalink
Fix modifications to notifications unread count not persisting throug…
Browse files Browse the repository at this point in the history
…h refresh
  • Loading branch information
ChiriVulpes committed Jan 30, 2025
1 parent bb01bca commit ad75a78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/model/Notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ad75a78

Please sign in to comment.