fix: notification icon doesnt work, #274

This commit is contained in:
Xylight committed 2024-03-08 17:06:55 -08:00
1 parent 33eddd252c
commit 3de749dbea
1 file changed
+10 -3
+10 -3
View File
@@ -373,7 +373,7 @@ const getNotificationCount = async (
}
}
async function checkInboxRepeatedly() {
async function checkInbox() {
if (!get(profile)) return
const { user, jwt } = get(profile)!
@@ -396,7 +396,14 @@ async function checkInboxRepeatedly() {
user: user,
}))
setTimeout(checkInboxRepeatedly, 5 * 60 * 1000)
}
checkInboxRepeatedly()
setInterval(checkInbox, 4 * 60 * 1000)
profile.subscribe((p) => {
if (!p) return
checkInbox()
})