summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-09-01 14:07:31 +0400
committerAndrew Dolgov <[email protected]>2013-09-01 14:07:31 +0400
commit07734eee5aef3b9641e752e908506cd2734d36f7 (patch)
tree02c147fc6a047ff232c09a1ca210ec468b0ed7cb /js
parent7bdc1df12146e7c43875f8099a3ef016b7db8844 (diff)
loadMoreHeadlines: use shorter syntax for adaptive offset calculation
Diffstat (limited to 'js')
-rw-r--r--js/feedlist.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/js/feedlist.js b/js/feedlist.js
index 7f60194dc..7c2e08052 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;
}