message_fetch: Fix home_msg_list newer FetchStatus tracking.

When we're doing the load_more frontfill, we were not correctly
declaring that we were in the process of doing a fetch.  Because the
next load_more call clears this state anyway, this was generally a
short race, off-screen, but it is still a data flow bug.

See the upcoming commits for a refactor that will eliminate the
possibility of this sort of bug.
This commit is contained in:
Tim Abbott
2018-12-12 15:49:25 -08:00
parent a6ca95dfc4
commit ba6ef745fe

View File

@@ -320,6 +320,8 @@ exports.initialize = function () {
var messages = data.messages;
var latest_id = messages[messages.length - 1].id;
home_msg_list.fetch_status.start_newer_batch();
message_list.all.fetch_status.start_newer_batch();
exports.load_messages({
anchor: latest_id.toFixed(),
num_before: 0,