Only show jumpToReadMarker bar when RM !== RR

If RM !== RR, use the pos. of the RM to determine whether it is visible, as before.
This commit is contained in:
Luke Barnard 2017-04-27 14:03:54 +01:00
parent 0e880f7971
commit 8f7359fce1
2 changed files with 11 additions and 7 deletions

View file

@ -1276,13 +1276,7 @@ module.exports = React.createClass({
return;
}
var pos = this.refs.messagePanel.getReadMarkerPosition();
// we want to show the bar if the read-marker is off the top of the
// screen.
// If pos is null, the event might not be paginated, so show the unread bar!
var showBar = pos < 0 || pos === null;
const showBar = this.refs.messagePanel.canJumpToReadMarker();
if (this.state.showTopUnreadMessagesBar != showBar) {
this.setState({showTopUnreadMessagesBar: showBar},
this.onChildResize);