Merge pull request #5331 from Transfusion/invisible_rooms_notif_badge

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:
Travis Ralston 2020-11-18 15:24:01 -07:00 committed by GitHub
commit 57562560d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -422,7 +422,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;
}); });