diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 32c53cd52a..ccaeda9659 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -264,19 +264,20 @@ const RoomSubList = React.createClass({ const subListNotifCount = subListNotifications[0]; const subListNotifHighlight = subListNotifications[1]; - let badge; - const badgeClasses = classNames({ - 'mx_RoomSubList_badge': true, - 'mx_RoomSubList_badgeHighlight': subListNotifHighlight, - }); - if (subListNotifCount > 0) { - badge =
- { FormattingUtils.formatCount(subListNotifCount) } -
; - } else if (this.props.isInvite) { - // no notifications but highlight anyway because this is an invite badge - badge =
!
; + if (!this.props.collapsed) { + const badgeClasses = classNames({ + 'mx_RoomSubList_badge': true, + 'mx_RoomSubList_badgeHighlight': subListNotifHighlight, + }); + if (subListNotifCount > 0) { + badge =
+ { FormattingUtils.formatCount(subListNotifCount) } +
; + } else if (this.props.isInvite) { + // no notifications but highlight anyway because this is an invite badge + badge =
!
; + } } // When collapsed, allow a long hover on the header to show user