]> git.wh0rd.org Git - tt-rss.git/commitdiff
only unmark articles which had been processed when automarking (for realz)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 4 Apr 2013 05:49:37 +0000 (09:49 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 4 Apr 2013 05:49:37 +0000 (09:49 +0400)
classes/rpc.php
js/viewfeed.js

index a6339209583ac8189dbd29bafa6501f8b00d1d60..508dd8d41e321f73697d328b191276f6e94497ac 100644 (file)
@@ -310,7 +310,7 @@ class RPC extends Handler_Protected {
 
                catchupArticlesById($this->link, $ids, $cmode);
 
-               print json_encode(array("message" => "UPDATE_COUNTERS"));
+               print json_encode(array("message" => "UPDATE_COUNTERS", "ids" => $ids));
        }
 
        function markSelected() {
index 3d23e4c0677919490a88854e23802f1bf69069e1..7813ab7ef7f3c3f90e37b61198f235538fab5891 100644 (file)
@@ -205,7 +205,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
                }
 
                _infscroll_request_sent = 0;
-               _last_headlines_update = new Date().getTime() / 1000;
+               _last_headlines_update = new Date().getTime();
 
                unpackVisibleHeadlines();
 
@@ -1210,9 +1210,8 @@ function headlines_scroll_handler(e) {
                if (getInitParam("cdm_auto_catchup") == 1) {
 
                        // let's get DOM some time to settle down
-                       var ts = new Date().getTime() / 1000;
-
-                       if (ts - _last_headlines_update < 3) return;
+                       var ts = new Date().getTime();
+                       if (ts - _last_headlines_update < 100) return;
 
                        $$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
                                function(child) {
@@ -1259,7 +1258,11 @@ function catchupBatchedArticles() {
                                onComplete: function(transport) {
                                        handle_rpc_json(transport);
 
+                                       reply = JSON.parse(transport.responseText);
+                                       var batch = reply.ids;
+
                                        batch.each(function(id) {
+                                               console.log(id);
                                                var elem = $("RROW-" + id);
                                                if (elem) elem.removeClassName("Unread");
                                                catchup_id_batch.remove(id);