]> git.wh0rd.org Git - tt-rss.git/commitdiff
loadMoreHeadlines: use shorter syntax for adaptive offset calculation
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 1 Sep 2013 10:07:31 +0000 (14:07 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 1 Sep 2013 10:07:31 +0000 (14:07 +0400)
js/feedlist.js

index 7f60194dc799828a9fc3f279d7acf8d3e0c05586..7c2e08052d41888afa630db048d5d36fc46f5a9d 100644 (file)
@@ -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;
                }