]> git.wh0rd.org Git - tt-rss.git/commitdiff
rpc tweaks; viewfeed counters attachment changed
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 15:01:09 +0000 (16:01 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 15:01:09 +0000 (16:01 +0100)
backend.php
feedlist.js
modules/backend-rpc.php

index d26461b4fc71ab7923781bcff1b1311730563d7b..67f254a19ff488ad2567b654a52ad22b51d09741 100644 (file)
 
                        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) {
 //                             print "</counters>";
 //                     }
 
-                       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 "<counters>";
                                        getAllCounters($link, $omode, $feed);
                                        print "</counters>";
+                                       $_SESSION["viewfeed:counters_stamp"] = time();
                                }
                        }
 
index 06fea27c7b76f09f60f4997c981cd2698a357527..68c93e4c5dc9f12a23651390b1864ea00a4f428a 100644 (file)
@@ -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();
index 41e8ebd188d1ed8bccc29ead195b665f20367af4..4d65ee23ed924943ed866324d76ae86dc401cce0 100644 (file)
 
                        print "<counters>";
 
-                       $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 "</counters>";
 
                        print_runtime_info($link);