From 4c4e153ace9466d9cdc9bd6de0d4003a2fc2bbff Mon Sep 17 00:00:00 2001 From: Jeff Arnold Date: Thu, 29 Nov 2012 16:07:19 -0500 Subject: [PATCH] When load_old_messages restarts itself, we need to repass all arguments Fixes a bug introduced by e30e02c2 (imported from commit ca07eab76295ab1557f6866cff19debaec26e8c2) --- zephyr/static/js/zephyr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 89efa55bc1..b9976e0d87 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -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); } });