From: Ajay Bura Date: Thu, 28 Oct 2021 10:00:16 +0000 (+0530) Subject: Hide pinned space notification from home icon X-Git-Tag: v1.5.0~17 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=2194cb65a2b54afd6673c78a71d8d298dc94ccdf;p=cinny.git Hide pinned space notification from home icon Signed-off-by: Ajay Bura --- diff --git a/src/app/organisms/navigation/SideBar.jsx b/src/app/organisms/navigation/SideBar.jsx index 294431e..8243259 100644 --- a/src/app/organisms/navigation/SideBar.jsx +++ b/src/app/organisms/navigation/SideBar.jsx @@ -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; }