parent
763aa8865b
commit
f53f54af7f
1 changed files with 1 additions and 7 deletions
|
@ -121,19 +121,13 @@ function SideBar() {
|
||||||
let noti = null;
|
let noti = null;
|
||||||
|
|
||||||
orphans.forEach((roomId) => {
|
orphans.forEach((roomId) => {
|
||||||
|
if (roomList.spaceShortcut.has(roomId)) return;
|
||||||
if (!notifications.hasNoti(roomId)) return;
|
if (!notifications.hasNoti(roomId)) return;
|
||||||
if (noti === null) noti = { total: 0, highlight: 0 };
|
if (noti === null) noti = { total: 0, highlight: 0 };
|
||||||
const childNoti = notifications.getNoti(roomId);
|
const childNoti = notifications.getNoti(roomId);
|
||||||
noti.total += childNoti.total;
|
noti.total += childNoti.total;
|
||||||
noti.highlight += childNoti.highlight;
|
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;
|
return noti;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue