1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-22 04:02:40 +03:00

fix roomtile badge

only put it in the dom if it has
anything to show as it has a border now in collapsed mode
This commit is contained in:
Bruno Windels
2018-11-05 14:23:28 +01:00
parent cb8393d449
commit c0becc7664
2 changed files with 10 additions and 10 deletions

View File

@@ -283,11 +283,11 @@ module.exports = React.createClass({
} else if (badges) {
const limitedCount = FormattingUtils.formatCount(notificationCount);
badgeContent = notificationCount ? limitedCount : '!';
} else {
badgeContent = '\u200B';
}
const badge = <div className={badgeClasses} onClick={this.onBadgeClicked}>{ badgeContent }</div>;
const badge = badgeContent ?
(<div className={badgeClasses} onClick={this.onBadgeClicked}>{ badgeContent }</div>) :
undefined;
const EmojiText = sdk.getComponent('elements.EmojiText');
let label;