From: Andrew Dolgov Date: Fri, 30 Nov 2018 11:25:12 +0000 (+0300) Subject: unpackVisibleHeadlines: go ahead of the buffer position a bit X-Git-Tag: 18.12~10 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=58dee80ae5c3eaf9e48d8ab04e043fdb03eb4554;p=tt-rss.git unpackVisibleHeadlines: go ahead of the buffer position a bit --- diff --git a/js/viewfeed.js b/js/viewfeed.js index 6ae9cdd8..e1d9cefd 100755 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -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");