Call maybe_rerender when prepending messages to a list.

We had a bug where once you scrolled back far enough
in the message view, your "window" for rendered messages
would be at the max, and `prepend` was not adjusting
the window correctly.  Now we follow the example of
`append` and call `maybe_rerender`.

This partially addresses #6628, where users were
reporting that the home key stopped going up in their
feed.  There was another bug at play for that issue
as well, which is fixed in the next commit.
This commit is contained in:
Steve Howell 2017-09-29 12:33:12 -07:00 committed by Tim Abbott
parent 860f62c792
commit 4d00c390ea
1 changed files with 3 additions and 0 deletions

View File

@ -927,6 +927,9 @@ MessageListView.prototype = {
this.render(slice_to_render, 'top', false);
this._render_win_start -= slice_to_render.length;
}
// See comment for maybe_rerender call in the append code path
this.maybe_rerender();
},
rerender_the_whole_thing: function MessageListView__rerender_the_whole_thing() {