Prechádzať zdrojové kódy

通知气泡数量为未读消息数量

visuddhinanda 2 rokov pred
rodič
commit
c1fef2003c

+ 2 - 2
dashboard/src/components/notification/NotificationIcon.tsx

@@ -40,8 +40,8 @@ const NotificationIconWidget = () => {
           "notification/updatedAt",
           now.getTime().toString()
         );
-        localStorage.setItem("notification/count", json.data.count.toString());
-        setCount(json.data.count);
+        localStorage.setItem("notification/count", json.data.unread.toString());
+        setCount(json.data.unread);
         if (json.data.count > 0) {
           const newMessageTime = json.data.rows[0].created_at;
           const lastTime = localStorage.getItem("notification/new");