message scrolling: Move early-exit code higher.

This avoids some unnecessary computation and will
simplify testing.
This commit is contained in:
Steve Howell
2019-01-05 16:08:53 +00:00
committed by Tim Abbott
parent 0f75be3e8e
commit efc1c74792

View File

@@ -804,9 +804,6 @@ MessageListView.prototype = {
return;
}
var info = message_viewport.message_viewport_info();
var scroll_limit = this._scroll_limit(selected_row, info);
if (new_messages_height <= 0) {
return;
}
@@ -827,6 +824,9 @@ MessageListView.prototype = {
return;
}
var info = message_viewport.message_viewport_info();
var scroll_limit = this._scroll_limit(selected_row, info);
// This next decision is fairly debatable. For a big message that
// would push the pointer off the screen, we do a partial autoscroll,
// which has the following implications: