Add badges to breadcrumb rooms

Fixes https://github.com/vector-im/riot-web/issues/8606
This commit is contained in:
Travis Ralston 2019-04-01 16:06:33 -06:00
parent c3d3dd1fd7
commit f5600fd4d7
6 changed files with 100 additions and 38 deletions

View file

@ -68,12 +68,11 @@ module.exports = React.createClass({
},
_shouldShowNotifBadge: function() {
const showBadgeInStates = [RoomNotifs.ALL_MESSAGES, RoomNotifs.ALL_MESSAGES_LOUD];
return showBadgeInStates.indexOf(this.state.notifState) > -1;
return RoomNotifs.BADGE_STATES.includes(this.state.notifState);
},
_shouldShowMentionBadge: function() {
return this.state.notifState !== RoomNotifs.MUTE;
return RoomNotifs.MENTION_BADGE_STATES.includes(this.state.notifState);
},
_isDirectMessageRoom: function(roomId) {