summaryrefslogtreecommitdiff
path: root/js/feedlist.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-14 19:30:49 +0400
committerAndrew Dolgov <[email protected]>2012-08-14 19:30:49 +0400
commit4d5eed551fde86dd15ca4e879fd6c9ec466a4b1a (patch)
tree0ab8a7fe64659cdebf5e665f5f3cdaf2932743a5 /js/feedlist.js
parent3ea91b2d18a95adf214b4dc599ba41a0e34e2d8a (diff)
only precache_headlines_idle() when actually idle
Diffstat (limited to 'js/feedlist.js')
-rw-r--r--js/feedlist.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/feedlist.js b/js/feedlist.js
index c8260f367..f915bce5e 100644
--- a/js/feedlist.js
+++ b/js/feedlist.js
@@ -1,6 +1,7 @@
var _infscroll_disable = 0;
var _infscroll_request_sent = 0;
var _search_query = false;
+var _viewfeed_last = 0;
var counter_timeout_id = false;
@@ -106,6 +107,8 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
dijit.byId("content-tabs").getChildren()[0]);
if (!background) {
+ _viewfeed_last = get_timestamp();
+
if (getActiveFeedId() != feed || offset == 0) {
active_post_id = 0;
_infscroll_disable = 0;
@@ -121,8 +124,7 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
}
if (offset != 0 && !method) {
- var date = new Date();
- var timestamp = Math.round(date.getTime() / 1000);
+ var timestamp = get_timestamp();
if (_infscroll_request_sent && _infscroll_request_sent + 30 > timestamp) {
//console.log("infscroll request in progress, aborting");