Apply suggestions from review

This commit is contained in:
Jaiwanth 2021-07-22 08:30:18 +05:30
parent 76040c652c
commit 517e8951ee
2 changed files with 5 additions and 7 deletions

View file

@ -145,7 +145,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
});
} else {
const lists = RoomListStore.instance.unfilteredLists;
TAG_ORDER.every(t => {
for (let i = 0; i < TAG_ORDER.length; i++) {
const t = TAG_ORDER[i];
const listRooms = lists[t];
const unreadRoom = listRooms.find((r: Room) => {
if (this.showInHomeSpace(r)) {
@ -159,10 +160,9 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
room_id: unreadRoom.roomId,
context_switch: true,
});
return false;
break;
}
return true;
});
}
}
}