From: Andrew Dolgov Date: Sat, 17 Jan 2009 15:01:09 +0000 (+0100) Subject: rpc tweaks; viewfeed counters attachment changed X-Git-Tag: 1.3.0~118 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a06d0e5a8b92a2015a05b376eb6b8f4a9878c4e0;p=tt-rss.git rpc tweaks; viewfeed counters attachment changed --- diff --git a/backend.php b/backend.php index d26461b4..67f254a1 100644 --- a/backend.php +++ b/backend.php @@ -337,11 +337,6 @@ if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info); - $viewfeed_ctr_interval = 300; - - if ($csync || $_SESSION["bw_limit"]) { - $viewfeed_ctr_interval = 60; - } // if (get_pref($link, "SYNC_COUNTERS") || // time() - $_SESSION["get_all_counters_stamp"] > $viewfeed_ctr_interval) { @@ -350,11 +345,13 @@ // print ""; // } - if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop) { + if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop || + time() - $_SESSION["viewfeed:counters_stamp"] > 30) { if (!$offset) { print ""; getAllCounters($link, $omode, $feed); print ""; + $_SESSION["viewfeed:counters_stamp"] = time(); } } diff --git a/feedlist.js b/feedlist.js index 06fea27c..68c93e4c 100644 --- a/feedlist.js +++ b/feedlist.js @@ -394,7 +394,8 @@ function feedlist_init() { document.onmousemove = mouse_move_handler; document.onmousedown = mouse_down_handler; document.onmouseup = mouse_up_handler; - setTimeout("timeout()", 0); + + setTimeout("timeout()", 1); if (typeof correctPNG != 'undefined') { correctPNG(); diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 41e8ebd1..4d65ee23 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -142,26 +142,26 @@ print ""; - $omode = $_GET["omode"]; + if ($global_unread_caller != $global_unread) { + + $omode = $_GET["omode"]; - if (!$omode) $omode = "tflc"; + if (!$omode) $omode = "tflc"; - if (strchr($omode, "l")) getLabelCounters($link); + if (strchr($omode, "l")) getLabelCounters($link); - if (strchr($omode, "c")) { - if (get_pref($link, 'ENABLE_FEED_CATS')) { - getCategoryCounters($link); - } - } - - if ($global_unread_caller != $global_unread) { + if (strchr($omode, "c")) { + if (get_pref($link, 'ENABLE_FEED_CATS')) { + getCategoryCounters($link); + } + } if (strchr($omode, "f")) getFeedCounters($link); - if (strchr($omode, "t")) getTagCounters($link); - } - - getGlobalCounters($link, $global_unread); + if (strchr($omode, "t")) getTagCounters($link); + getGlobalCounters($link, $global_unread); + } + print ""; print_runtime_info($link);