From 07734eee5aef3b9641e752e908506cd2734d36f7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 1 Sep 2013 14:07:31 +0400 Subject: [PATCH] loadMoreHeadlines: use shorter syntax for adaptive offset calculation --- js/feedlist.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } -- 2.39.5