summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-25 09:51:47 +0400
committerAndrew Dolgov <[email protected]>2011-11-25 09:51:47 +0400
commit79ddf6aa771e449b4ea4cb0191a4470b0ddc52e2 (patch)
treec841f099f63d6bb33ede9da8097f8e14f8ad0fc4
parent5b54efce2f6634ce1ab4a5f6641c33a97aa3d19e (diff)
tweak auto catchup a bit
-rw-r--r--viewfeed.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/viewfeed.js b/viewfeed.js
index d5b92ebe3..360384c17 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -1108,6 +1108,7 @@ function headlines_scroll_handler(e) {
__("Loading, please wait...");
loadMoreHeadlines();
+ return;
}
} else {
@@ -1125,13 +1126,18 @@ function headlines_scroll_handler(e) {
if (catchup_id_batch.indexOf(id) == -1)
catchup_id_batch.push(id);
+
+ //console.log("auto_catchup_batch: " + catchup_id_batch.toString());
}
});
- if (catchup_id_batch.length > 0 && !_infscroll_request_sent) {
+ if (catchup_id_batch.length > 0) {
window.clearTimeout(catchup_timeout_id);
- catchup_timeout_id = window.setTimeout('catchupBatchedArticles()',
- 1000);
+
+ if (!_infscroll_request_sent) {
+ catchup_timeout_id = window.setTimeout('catchupBatchedArticles()',
+ 2000);
+ }
}
}