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
@@ -10,7 +10,7 @@
PrivateMessageReportView,
} from 'lemmy-js-client'
import { Check, Icon } from 'svelte-hero-icons'
import { profile } from '$lib/auth.js'
import { notifications, profile } from '$lib/auth.js'
import { Button } from 'mono-svelte'
import type { ReportView } from '$lib/lemmy/report.js'
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
@@ -77,7 +77,7 @@
}
}
$profile.user.notifications.reports += item.resolved ? 1 : -1
$notifications.reports += item.resolved ? 1 : -1
} catch (err) {
toast({
content: err as any,