use right check for end of timeline

and avoid bad interactions with forward pagination. thanks @richvdh
pull/21833/head
Matthew Hodgson 2016-05-17 21:32:08 +01:00
parent 24adf2847e
commit 1459478ee0
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ var TimelinePanel = React.createClass({
// if we are scrolled to the bottom, do a quick-reset of our unreadNotificationCount // if we are scrolled to the bottom, do a quick-reset of our unreadNotificationCount
// to avoid having to wait from the remote echo from the homeserver. // to avoid having to wait from the remote echo from the homeserver.
if (this.getScrollState().stuckAtBottom) { if (this.isAtEndOfLiveTimeline()) {
this.props.room.setUnreadNotificationCount('total', 0); this.props.room.setUnreadNotificationCount('total', 0);
this.props.room.setUnreadNotificationCount('highlight', 0); this.props.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 // XXX: i'm a bit surprised we don't have to emit an event or dispatch to get this picked up