When load_old_messages restarts itself, we need to repass all arguments

Fixes a bug introduced by e30e02c2

(imported from commit ca07eab76295ab1557f6866cff19debaec26e8c2)
This commit is contained in:
Jeff Arnold 2012-11-29 16:07:19 -05:00
parent 6d966eff27
commit 4c4e153ace
1 changed files with 4 additions and 2 deletions

View File

@ -670,7 +670,8 @@ function load_old_messages(anchor, num_before, num_after, cont, for_narrow,
// The server occationally returns no data during a
// restart. Ignore those responses and try again
setTimeout(function () {
load_old_messages(anchor, num_before, num_after, cont, for_narrow);
load_old_messages(anchor, num_before, num_after, cont, for_narrow,
cont_will_add_messages);
}, 0);
return;
}
@ -689,7 +690,8 @@ function load_old_messages(anchor, num_before, num_after, cont, for_narrow,
// We might want to be more clever here
$('#connection-error').show();
setTimeout(function () {
load_old_messages(anchor, num_before, num_after, cont, for_narrow);
load_old_messages(anchor, num_before, num_after, cont, for_narrow,
cont_will_add_messages);
}, 5000);
}
});