From: Andrew Dolgov Date: Wed, 29 Jul 2015 13:57:24 +0000 (+0300) Subject: headlines scroll handler: make preloading less aggressive X-Git-Tag: 16.3~200 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d46af5a5cf0a0b268372d6e09e7205e3b108069a;p=tt-rss.git headlines scroll handler: make preloading less aggressive --- diff --git a/js/viewfeed.js b/js/viewfeed.js index e1425a38..6e6e1c15 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1279,26 +1279,15 @@ function headlines_scroll_handler(e) { } if (!_infscroll_disable) { - if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) || - (e.scrollHeight != 0 && - ((e.scrollTop + e.offsetHeight) / e.scrollHeight >= 0.7))) { + if (hsp && hsp.offsetTop <= e.scrollTop + e.offsetHeight) { - if (hsp) - hsp.innerHTML = " " + - __("Loading, please wait...") + ""; + hsp.innerHTML = " " + + __("Loading, please wait...") + ""; loadMoreHeadlines(); return; } - /*} else { - if (hsp) { - if (_infscroll_disable) - hsp.innerHTML = "" + - __("Click to open next unread feed.") + ""; - else - hsp.innerHTML = ""; - }*/ } if (isCdmMode()) {