Prevent unnecessary calc in home roomlist

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura committed 2022-03-14 17:34:34 +05:30
1 parent e863f95e25
commit f3082691b5
2 files changed
+13 -7

No files matched your search

+8
View File
@@ -36,6 +36,14 @@ class RoomList extends EventEmitter {
return !this.roomIdToParents.has(roomId);
}
getOrphanSpaces() {
return [...this.spaces].filter((roomId) => !this.roomIdToParents.has(roomId));
}
getOrphanRooms() {
return [...this.rooms].filter((roomId) => !this.roomIdToParents.has(roomId));
}
getOrphans() {
const rooms = [...this.spaces].concat([...this.rooms]);
return rooms.filter((roomId) => !this.roomIdToParents.has(roomId));