From d079c39e9e93f75ae6c7996f206d76a9e82e2ceb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 Jun 2013 08:59:33 +0400 Subject: [PATCH] support view mode setting in offline article pager (closes #712) --- src/org/fox/ttrss/offline/OfflineArticlePager.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/org/fox/ttrss/offline/OfflineArticlePager.java b/src/org/fox/ttrss/offline/OfflineArticlePager.java index 1aa226bb..96c816b7 100644 --- a/src/org/fox/ttrss/offline/OfflineArticlePager.java +++ b/src/org/fox/ttrss/offline/OfflineArticlePager.java @@ -50,6 +50,20 @@ public class OfflineArticlePager extends Fragment { feedClause = "feed_id = ?"; } + String viewMode = m_activity.getViewMode(); + + if ("adaptive".equals(viewMode)) { + // TODO: implement adaptive + } else if ("marked".equals(viewMode)) { + feedClause += "AND (marked = 1)"; + } else if ("published".equals(viewMode)) { + feedClause += "AND (published = 1)"; + } else if ("unread".equals(viewMode)) { + feedClause += "AND (unread = 1)"; + } else { // all_articles + // + } + String orderBy = (m_prefs.getBoolean("offline_oldest_first", false)) ? "updated" : "updated DESC"; if (m_searchQuery == null || m_searchQuery.equals("")) {