switch badge count to per-conversation, and add per-room badges

This commit is contained in:
Matthew Hodgson 2016-05-17 11:14:12 +01:00
parent 5bde32f7fe
commit fd09d5c570
2 changed files with 7 additions and 4 deletions

View file

@ -83,7 +83,7 @@ module.exports = React.createClass({
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
var badge;
if (this.props.highlight || notificationCount > 0) {
badge = <div className="mx_RoomTile_badge"/>;
badge = <div className="mx_RoomTile_badge">{ notificationCount ? notificationCount : '!' }</div>;
}
/*
if (this.props.highlight) {
@ -132,9 +132,9 @@ module.exports = React.createClass({
<div className={classes} onClick={this.onClick} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<div className="mx_RoomTile_avatar">
<RoomAvatar room={this.props.room} width={24} height={24} />
{ badge }
</div>
{ label }
{ badge }
{ incomingCallBox }
</div>
));