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

This commit is contained in:
Bryan Kok 2020-10-17 14:35:11 +08:00
parent d5e9d5306a
commit 176c7c32da

View file

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