From b19a318b2d7f73422a49a35e3d3a7994e0650187 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 22 Jan 2016 17:22:49 +0000 Subject: [PATCH] put a black badge on unread notifications, and a red one for unread highlights --- src/components/views/rooms/RoomTile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 29b35c040c..8e2ed512f8 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -63,10 +63,15 @@ module.exports = React.createClass({ render: function() { var myUserId = MatrixClientPeg.get().credentials.userId; var me = this.props.room.currentState.members[myUserId]; + + var notificationCount = this.props.room.getUnreadNotificationCount(); + // var highlightCount = this.props.room.getUnreadNotificationCount("highlight"); + var classes = classNames({ 'mx_RoomTile': true, 'mx_RoomTile_selected': this.props.selected, 'mx_RoomTile_unread': this.props.unread, + 'mx_RoomTile_unreadNotify': notificationCount > 0, 'mx_RoomTile_highlight': this.props.highlight, 'mx_RoomTile_invited': (me && me.membership == 'invite'), }); @@ -77,7 +82,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) { + if (this.props.highlight || notificationCount > 0) { badge =
; } /*