diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 602ed4ee04..2acf0bb3b5 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -68,7 +68,7 @@ module.exports = React.createClass({ case 'notification_change': // Is the notification about this room? if (payload.roomId === this.props.room.roomId) { - this.setState( { areNotifsMuted : payload.isMuted }); + this.setState( { areNotifsMuted : payload.areNotifsMuted }); } break; } @@ -150,22 +150,20 @@ module.exports = React.createClass({ 'mx_RoomTile': true, 'mx_RoomTile_selected': this.props.selected, 'mx_RoomTile_unread': this.props.unread, - 'mx_RoomTile_unreadNotify': notificationCount > 0, - 'mx_RoomTile_read': !(this.props.highlight || notificationCount > 0), + 'mx_RoomTile_unreadNotify': notificationCount > 0 && !this.state.areNotifsMuted, 'mx_RoomTile_highlight': this.props.highlight, 'mx_RoomTile_invited': (me && me.membership == 'invite'), 'mx_RoomTile_menu': this.state.menu, + 'mx_RoomTile_noBadges': !(this.props.highlight || (notificationCount > 0 && !this.state.areNotifsMuted)) }); var avatarClasses = classNames({ 'mx_RoomTile_avatar': true, - 'mx_RoomTile_mute': this.state.areNotifsMuted, }); var badgeClasses = classNames({ 'mx_RoomTile_badge': true, 'mx_RoomTile_badgeButton': this.state.badgeHover || this.state.menu, - 'mx_RoomTile_badgeMute': this.state.areNotifsMuted, }); // XXX: We should never display raw room IDs, but sometimes the @@ -178,18 +176,14 @@ module.exports = React.createClass({ if (this.state.badgeHover || this.state.menu) { badgeContent = "\u00B7\u00B7\u00B7"; - } else if (this.props.highlight || notificationCount > 0) { + } else if (this.props.highlight || (notificationCount > 0 && !this.state.areNotifsMuted)) { var limitedCount = (notificationCount > 99) ? '99+' : notificationCount; badgeContent = notificationCount ? limitedCount : '!'; } else { badgeContent = '\u200B'; } - if (this.state.areNotifsMuted && !(this.state.badgeHover || this.state.menu)) { - badge =