From: Andrew Dolgov Date: Sun, 1 Sep 2013 10:07:31 +0000 (+0400) Subject: loadMoreHeadlines: use shorter syntax for adaptive offset calculation X-Git-Tag: 1.10~19 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=07734eee5aef3b9641e752e908506cd2734d36f7;p=tt-rss.git loadMoreHeadlines: use shorter syntax for adaptive offset calculation --- diff --git a/js/feedlist.js b/js/feedlist.js index 7f60194d..7c2e0805 100644 --- a/js/feedlist.js +++ b/js/feedlist.js @@ -35,10 +35,7 @@ function loadMoreHeadlines() { } else if (_search_query) { offset = num_all; } else if (view_mode == "adaptive") { - if (num_unread > 0) - offset = unread_in_buffer; - else - offset = num_all; + offset = num_unread > 0 ? unread_in_buffer : num_all; } else { offset = num_all; }