Hide pinned space notification from home icon
authorAjay Bura <ajbura@gmail.com>
Thu, 28 Oct 2021 10:00:16 +0000 (15:30 +0530)
committerAjay Bura <ajbura@gmail.com>
Thu, 28 Oct 2021 10:00:16 +0000 (15:30 +0530)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
src/app/organisms/navigation/SideBar.jsx

index 294431eafb15990a3c01cbba6e84bc40c454d843..82432595766cb21cea61c68a6b679608723f1da5 100644 (file)
@@ -127,6 +127,13 @@ function SideBar() {
       noti.total += childNoti.total;
       noti.highlight += childNoti.highlight;
     });
+    if (noti === null) return noti;
+
+    [...roomList.spaceShortcut].forEach((spaceId) => {
+      const shortcutNoti = notifications.getNoti(spaceId);
+      noti.total -= shortcutNoti.total;
+      noti.highlight -= shortcutNoti.highlight;
+    });
 
     return noti;
   }