From 866dc935a09b1e3107543062629ae7478f64a2cb Mon Sep 17 00:00:00 2001
From: ari melody <ari@arimelody.me>
Date: Sun, 19 Jan 2025 22:42:06 +0000
Subject: [PATCH] fixed unread notif counter not updating

---
 src/routes/notifications/+page.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/routes/notifications/+page.svelte b/src/routes/notifications/+page.svelte
index cc392c7..c6294d8 100644
--- a/src/routes/notifications/+page.svelte
+++ b/src/routes/notifications/+page.svelte
@@ -7,9 +7,9 @@
 
     if (!$account) goto("/");
 
-    getNotifications().then(notif_data => {
-        if (notif_data && notif_data.constructor === Array) {
-            last_read_notif_id.set(notif_data[0].id);
+    getNotifications().then(() => {
+        if ($notifications.length > 0) {
+            last_read_notif_id.set($notifications[0].id);
         }
         unread_notif_count.set(0);
     });