]> git.wh0rd.org - tt-rss.git/commitdiff
unpackVisibleHeadlines: go ahead of the buffer position a bit
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 11:25:12 +0000 (14:25 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 11:25:12 +0000 (14:25 +0300)
js/viewfeed.js

index 6ae9cdd8a503fe42cd51c65775de293d81e41d2c..e1d9cefdfabe91589efeb0cc1db244f393f92893 100755 (executable)
@@ -1008,11 +1008,12 @@ function unpackVisibleHeadlines() {
        if (!isCdmMode()) return;
 
     const rows = $$("#headlines-frame div[id*=RROW][data-content]");
+       const threshold = $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight + 100;
 
     for (let i = 0; i < rows.length; i++) {
         const row = rows[i];
 
-        if (row.offsetTop <= $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight) {
+        if (row.offsetTop <= threshold) {
             console.log("unpacking: " + row.id);
 
             const content = row.getAttribute("data-content");