diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js
index be472d92f7..e1bc1954da 100644
--- a/src/components/structures/RoomSubList.js
+++ b/src/components/structures/RoomSubList.js
@@ -263,19 +263,21 @@ const RoomSubList = React.createClass({
const subListNotifCount = subListNotifications[0];
const subListNotifHighlight = subListNotifications[1];
- const badgeClasses = classNames({
- 'mx_RoomSubList_badge': true,
- 'mx_RoomSubList_badgeHighlight': subListNotifHighlight,
- });
let badge;
- 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.state.hidden) {
+ 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