mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-09 00:30:28 +03:00
Prevent unnecessary calc in home roomlist
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
fe18611b4b
commit
211fd19031
2 changed files with 13 additions and 7 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue