Skip to content

Commit

Permalink
depending on option, only load unread articles
Browse files Browse the repository at this point in the history
  • Loading branch information
mboinet committed May 25, 2013
1 parent dbf219e commit 87697e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,14 @@ define(['api','backbone','utils'],

var orderBy = settings.get("articlesOldestFirst") === true ? "date_reverse" : "feed_dates";

// set view_mode depending on options
var viewMode = settings.get("hideEmptyCategories") ? "unread" : "adaptive";

// we need to fetch the articles list for this feed
var msg = {
op: "getHeadlines",
show_excerpt: false,
view_mode: "adaptive",
view_mode: viewMode,
show_content: true,
limit: settings.get("articlesNumber"),
order_by: orderBy
Expand Down

0 comments on commit 87697e7

Please sign in to comment.