From: Andrew Dolgov Date: Tue, 28 Aug 2012 12:07:02 +0000 (+0400) Subject: loadMoreHeadlines: revert to old behaviour for adaptive X-Git-Tag: 1.6.0~102 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fe0a51ac83c03c9377edbfc8f8f315b5f2d87d6d;p=tt-rss.git loadMoreHeadlines: revert to old behaviour for adaptive --- diff --git a/js/feedlist.js b/js/feedlist.js index aec93862..e838562a 100644 --- a/js/feedlist.js +++ b/js/feedlist.js @@ -21,6 +21,7 @@ function loadMoreHeadlines() { var view_mode = document.forms["main_toolbar_form"].view_mode.value; var unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length; var num_all = $$("#headlines-frame > div[id*=RROW]").length; + var num_unread = getFeedUnread(getActiveFeedId(), activeFeedIsCat()); // TODO implement marked & published @@ -33,7 +34,7 @@ function loadMoreHeadlines() { } else if (view_mode == "unread") { offset = unread_in_buffer; } else if (view_mode == "adaptive") { - if (unread_in_buffer > 0) + if (num_unread > 0) offset = unread_in_buffer; else offset = num_all;