From 1459478ee0f326d40e15cff924151b1044c234c1 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 17 May 2016 21:32:08 +0100 Subject: [PATCH] use right check for end of timeline and avoid bad interactions with forward pagination. thanks @richvdh --- src/components/structures/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index e15993a07c..d804dfd6b9 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -401,7 +401,7 @@ var TimelinePanel = React.createClass({ // 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. - if (this.getScrollState().stuckAtBottom) { + if (this.isAtEndOfLiveTimeline()) { this.props.room.setUnreadNotificationCount('total', 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