From 2194cb65a2b54afd6673c78a71d8d298dc94ccdf Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Thu, 28 Oct 2021 15:30:16 +0530 Subject: [PATCH] Hide pinned space notification from home icon Signed-off-by: Ajay Bura --- src/app/organisms/navigation/SideBar.jsx | 7 +++++++ 1 file changed, 7 insertions(+) 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; }