Use message_list.all for backfill anchor for home view.

The "all" list and "home" list are basically kept in sync, and
the former is a superset of the latter.

Whenever we are backfilling, we want to backfill "all", so we use
it as the anchor, even though home_msg_list is the message list
we are actually rendering.
This commit is contained in:
Steve Howell
2018-03-21 11:19:28 -04:00
committed by Tim Abbott
parent f524a095a2
commit e8bc781fd5

View File

@@ -151,6 +151,10 @@ exports.load_messages_for_narrow = function (opts) {
exports.get_backfill_anchor = function (msg_list) {
var oldest_message_id;
if (msg_list === home_msg_list) {
msg_list = message_list.all;
}
if (msg_list.first() === undefined) {
oldest_message_id = page_params.pointer;
} else {