diff options
author | Andrew Dolgov <[email protected]> | 2013-03-27 14:02:23 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-27 14:02:23 +0400 |
commit | 65fc57a0c05e71f19f8d8efa1980824c211aa199 (patch) | |
tree | 73754ae183ab2a35176af6a39fb6ffc12045a95b /src | |
parent | ab184cb5bdf99feb83f591fbe810cf394ca2ba36 (diff) |
offline: fix catchup_above not respecting oldest first setting; exclude
current article for consistency with tt-rss
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index bfc6d64f..b73efb92 100644 --- a/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -180,15 +180,17 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis SQLiteStatement stmt = null;
+ String updatedOperator = (m_prefs.getBoolean("offline_oldest_first", false)) ? "<" : ">";
+
if (m_feedIsCat) {
stmt = m_activity.getWritableDb().compileStatement(
"UPDATE articles SET modified = 1, unread = 0 WHERE " +
- "updated >= (SELECT updated FROM articles WHERE " + BaseColumns._ID + " = ?) " +
+ "updated "+updatedOperator+" (SELECT updated FROM articles WHERE " + BaseColumns._ID + " = ?) " +
"AND feed_id IN (SELECT "+BaseColumns._ID+" FROM feeds WHERE cat_id = ?)");
} else {
stmt = m_activity.getWritableDb().compileStatement(
"UPDATE articles SET modified = 1, unread = 0 WHERE " +
- "updated >= (SELECT updated FROM articles WHERE " + BaseColumns._ID + " = ?) " +
+ "updated "+updatedOperator+" (SELECT updated FROM articles WHERE " + BaseColumns._ID + " = ?) " +
"AND feed_id = ?");
}
|