]> git.wh0rd.org Git - tt-rss.git/commitdiff
try to fill the buffer with headlines if possible
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 6 Apr 2013 06:33:30 +0000 (10:33 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 6 Apr 2013 06:33:30 +0000 (10:33 +0400)
js/viewfeed.js

index db1a4bf94c982bba1c9eb1b8f2a93853876c6db3..77ec5ce069ed3b43c81d99b2f404223a696e9de9 100644 (file)
@@ -210,6 +210,16 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
 
                unpackVisibleHeadlines();
 
+               // if we have some more space in the buffer, why not try to fill it
+
+               if (!_infscroll_disable && $("headlines-spacer").offsetTop <
+                               $("headlines-frame").offsetHeight) {
+
+                       window.setTimeout(function() {
+                               loadMoreHeadlines();
+                       }, 250);
+               }
+
                notify("");
 
        } catch (e) {