mirror of https://github.com/vector-im/riot-web
Fix cleaning unread state on room select & ignore our own messages
parent
7c405f673a
commit
90f6764cbf
|
@ -23,8 +23,8 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function() {
|
componentWillReceiveProps: function(newProps) {
|
||||||
this.state.activityMap[this.props.selectedRoom] = undefined;
|
this.state.activityMap[newProps.selectedRoom] = undefined;
|
||||||
this.setState({
|
this.setState({
|
||||||
activityMap: this.state.activityMap
|
activityMap: this.state.activityMap
|
||||||
});
|
});
|
||||||
|
@ -32,6 +32,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
onRoomTimeline: function(ev, room, toStartOfTimeline) {
|
onRoomTimeline: function(ev, room, toStartOfTimeline) {
|
||||||
if (room.roomId == this.props.selectedRoom) return;
|
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
|
// obviously this won't deep copy but we this shouldn't be necessary
|
||||||
var amap = this.state.activityMap;
|
var amap = this.state.activityMap;
|
||||||
|
|
Loading…
Reference in New Issue