From 0344b465cc4445e92f70f21a62780210fb38d9d2 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Fri, 29 Oct 2021 13:20:27 +0530 Subject: [PATCH] Refactor a58f4d0dcf236b59d69b082ba90a4487f5f17e20 Signed-off-by: Ajay Bura --- src/app/organisms/navigation/SideBar.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/organisms/navigation/SideBar.jsx b/src/app/organisms/navigation/SideBar.jsx index 82432595..35fe8f2e 100644 --- a/src/app/organisms/navigation/SideBar.jsx +++ b/src/app/organisms/navigation/SideBar.jsx @@ -121,19 +121,13 @@ function SideBar() { let noti = null; orphans.forEach((roomId) => { + if (roomList.spaceShortcut.has(roomId)) return; if (!notifications.hasNoti(roomId)) return; if (noti === null) noti = { total: 0, highlight: 0 }; const childNoti = notifications.getNoti(roomId); 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; }