]> git.wh0rd.org Git - tt-rss.git/commitdiff
(experimental) disable infscroll requests while marking auto catched up articles...
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 14 Jul 2015 09:50:27 +0000 (12:50 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 14 Jul 2015 09:50:27 +0000 (12:50 +0300)
js/feedlist.js
js/viewfeed.js

index 0bfb6b6a7fbedc25c0aca923695178959a53a926..6284534dba8e3a9d003c8d3ac706c4dd07f30403 100644 (file)
@@ -1,5 +1,7 @@
 var _infscroll_disable = 0;
 var _infscroll_request_sent = 0;
+var _infscroll_tmp_disable = 0;
+
 var _search_query = false;
 var _viewfeed_last = 0;
 var _viewfeed_timeout = false;
@@ -13,7 +15,9 @@ function viewCategory(cat) {
 
 function loadMoreHeadlines() {
        try {
-               console.log("loadMoreHeadlines");
+               console.log("loadMoreHeadlines: " + _infscroll_tmp_disable);
+
+               if (_infscroll_tmp_disable) return;
 
                var offset = 0;
 
index 56b15116fd6fb74a80d38686eb52bc0641c83f43..e1425a3820fd056e0e8f834d78ace9a74015617d 100644 (file)
@@ -1384,6 +1384,8 @@ function catchupBatchedArticles() {
                                        reply = JSON.parse(transport.responseText);
                                        var batch = reply.ids;
 
+                                       _infscroll_tmp_disable = 1;
+
                                        batch.each(function(id) {
                                                console.log(id);
                                                var elem = $("RROW-" + id);
@@ -1391,6 +1393,8 @@ function catchupBatchedArticles() {
                                                catchup_id_batch.remove(id);
                                        });
 
+                                       _infscroll_tmp_disable = 0;
+
                                        updateFloatingTitle(true);
 
                                } });