don't show notification count in expanded room section header

This commit is contained in:
Bruno Windels 2018-10-19 14:50:35 +02:00
parent acd383c6a9
commit e4276d9378

View file

@ -263,19 +263,21 @@ const RoomSubList = React.createClass({
const subListNotifCount = subListNotifications[0]; const subListNotifCount = subListNotifications[0];
const subListNotifHighlight = subListNotifications[1]; const subListNotifHighlight = subListNotifications[1];
const badgeClasses = classNames({
'mx_RoomSubList_badge': true,
'mx_RoomSubList_badgeHighlight': subListNotifHighlight,
});
let badge; let badge;
if (subListNotifCount > 0) { if (this.state.hidden) {
badge = <div className={badgeClasses} onClick={this._onNotifBadgeClick}> const badgeClasses = classNames({
{ FormattingUtils.formatCount(subListNotifCount) } 'mx_RoomSubList_badge': true,
</div>; 'mx_RoomSubList_badgeHighlight': subListNotifHighlight,
} else if (this.props.isInvite) { });
// no notifications but highlight anyway because this is an invite badge if (subListNotifCount > 0) {
badge = <div className={badgeClasses} onClick={this._onInviteBadgeClick}>!</div>; badge = <div className={badgeClasses} onClick={this._onNotifBadgeClick}>
{ FormattingUtils.formatCount(subListNotifCount) }
</div>;
} else if (this.props.isInvite) {
// no notifications but highlight anyway because this is an invite badge
badge = <div className={badgeClasses} onClick={this._onInviteBadgeClick}>!</div>;
}
} }
// When collapsed, allow a long hover on the header to show user // When collapsed, allow a long hover on the header to show user