Search through the list of unfiltered rooms rather than the rooms in the state which are already filtered by the search text

pull/21833/head
Bryan Kok 2020-10-17 14:35:11 +08:00
parent d5e9d5306a
commit 176c7c32da
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
room = this.state.rooms && this.state.rooms[0];
} else {
// find the first room with a count of the same colour as the badge count
room = this.state.rooms.find((r: Room) => {
room = RoomListStore.instance.unfilteredLists[this.props.tagId].find((r: Room) => {
const notifState = this.notificationState.getForRoom(r);
return notifState.count > 0 && notifState.color === this.notificationState.color;
});