fix: make dedicated $notifications store

This commit is contained in:
Xylight committed 2024-07-06 11:33:31 -07:00
1 parent 19d4617dbf
commit 53bf2ebf78
10 files changed
+52 -51

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import { getClient } from '$lib/lemmy.js'
import { profile } from '$lib/auth.js'
import { notifications, profile } from '$lib/auth.js'
import {
ArrowUturnLeft,
ArrowUturnUp,
@@ -58,7 +58,7 @@
}
item.read = isRead
if ($profile.user) $profile.user.notifications.inbox += isRead ? -1 : 1
if ($profile.user) $notifications.inbox += isRead ? -1 : 1
loading = false
}