Merge pull request #775 from matrix-org/luke/fix-RoomList-notif-flashing
Improve zeroing of RoomList notification badgespull/21833/head
commit
91d10646b5
|
@ -478,7 +478,9 @@ var TimelinePanel = React.createClass({
|
||||||
if (this.isAtEndOfLiveTimeline()) {
|
if (this.isAtEndOfLiveTimeline()) {
|
||||||
this.props.timelineSet.room.setUnreadNotificationCount('total', 0);
|
this.props.timelineSet.room.setUnreadNotificationCount('total', 0);
|
||||||
this.props.timelineSet.room.setUnreadNotificationCount('highlight', 0);
|
this.props.timelineSet.room.setUnreadNotificationCount('highlight', 0);
|
||||||
// XXX: i'm a bit surprised we don't have to emit an event or dispatch to get this picked up
|
dis.dispatch({
|
||||||
|
action: 'on_room_read',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentReadUpToEventId = this._getCurrentReadReceipt(true);
|
var currentReadUpToEventId = this._getCurrentReadReceipt(true);
|
||||||
|
|
|
@ -96,6 +96,12 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'on_room_read':
|
||||||
|
// Force an update because the notif count state is too deep to cause
|
||||||
|
// an update. This forces the local echo of reading notifs to be
|
||||||
|
// reflected by the RoomTiles.
|
||||||
|
this.forceUpdate();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue