From f44c6d01b005731ee004e26e857eaaed5b9db0de Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 3 Jan 2019 01:00:09 +0300 Subject: [PATCH] fix previous always disabling infscroll --- js/Headlines.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/Headlines.js b/js/Headlines.js index 3685cd7ba..6231daa79 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -547,6 +547,8 @@ define(["dojo/_base/declare"], function (declare) { return; const headlines_count = reply['headlines-info']['count']; + + Feeds.infscroll_disabled = parseInt(headlines_count) < 30; console.log('received', headlines_count, 'headlines, infscroll disabled=', Feeds.infscroll_disabled); //this.vgroup_last_feed = reply['headlines-info']['vgroup_last_feed']; @@ -638,10 +640,10 @@ define(["dojo/_base/declare"], function (declare) { } } - console.log('appended', headlines_appended, 'headlines'); - Feeds.infscroll_disabled = headlines_appended != 30; + console.log('appended', headlines_appended, 'headlines, infscroll_disabled=', Feeds.infscroll_disabled); + if (!hsp) { hsp = document.createElement("div"); hsp.id = "headlines-spacer";