From 90f6764cbf8e6d5abec61cce7ef56cb3e9c7491b Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Jun 2015 14:40:55 +0100 Subject: [PATCH] Fix cleaning unread state on room select & ignore our own messages --- src/organisms/RoomList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/organisms/RoomList.js b/src/organisms/RoomList.js index 20c8a162e3..e335c89921 100644 --- a/src/organisms/RoomList.js +++ b/src/organisms/RoomList.js @@ -23,8 +23,8 @@ module.exports = React.createClass({ } }, - componentWillReceiveProps: function() { - this.state.activityMap[this.props.selectedRoom] = undefined; + componentWillReceiveProps: function(newProps) { + this.state.activityMap[newProps.selectedRoom] = undefined; this.setState({ activityMap: this.state.activityMap }); @@ -32,6 +32,7 @@ module.exports = React.createClass({ onRoomTimeline: function(ev, room, toStartOfTimeline) { if (room.roomId == this.props.selectedRoom) return; + if (ev.getSender() == MatrixClientPeg.get().credentials.userId) return; // obviously this won't deep copy but we this shouldn't be necessary var amap = this.state.activityMap;