Skip to content

Commit 46646cb

Browse files
committed
Highlight room tiles on bing
1 parent 57ba816 commit 46646cb

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎skins/base/css/molecules/RoomTile.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ limitations under the License.
4040
background-color: #66e;
4141
}
4242

43+
.mx_RoomTile.highlight {
44+
background-color: lime;
45+
}
46+
4347
.mx_RoomTile.invited {
4448
background-color: #6e6;
4549
}

‎skins/base/views/molecules/RoomTile.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = React.createClass({
3232
'mx_RoomTile': true,
3333
'selected': this.props.selected,
3434
'unread': this.props.unread,
35+
'highlight': this.props.highlight,
3536
'invited': this.props.room.currentState.members[myUserId].membership == 'invite'
3637
});
3738
return (

‎src/controllers/organisms/RoomList.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,16 @@ module.exports = {
6363
if (room.roomId == this.props.selectedRoom) return;
6464
if (ev.getSender() == MatrixClientPeg.get().credentials.userId) return;
6565

66+
var hl = 1;
67+
68+
var actions = ev.getPushActions(MatrixClientPeg.get());
69+
if (actions || actions.tweaks && actions.tweaks.highlight) {
70+
hl = 2;
71+
}
72+
6673
// obviously this won't deep copy but we this shouldn't be necessary
6774
var amap = this.state.activityMap;
68-
amap[room.roomId] = 1;
75+
amap[room.roomId] = Math.max(amap[room.roomId] || 0, hl);
6976
this.setState({
7077
activityMap: amap
7178
});

0 commit comments

Comments
 (0)