diff options
author | Erik Hardesty <[email protected]> | 2013-03-30 17:58:55 -0500 |
---|---|---|
committer | Erik Hardesty <[email protected]> | 2013-03-30 17:58:55 -0500 |
commit | b7e5436576be1b84225b9e2e8c7ca32dfb55822c (patch) | |
tree | 3e5c58bb38e611ff41c239616ec63812ba11f899 /src | |
parent | 5792022b559eb3ac886f363f76b6f3857efb8d29 (diff) |
Add mark read on scroll for headlines
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 924f3b52..fce000fc 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -796,6 +796,20 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (!m_refreshInProgress && m_articles.findById(-1) != null && firstVisibleItem + visibleItemCount == m_articles.size()) {
refresh(true);
}
+
+ if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
+ if (firstVisibleItem > 0) {
+ Article a = m_articles.get(firstVisibleItem - 1);
+ if (a != null) {
+ if (a.unread) {
+ a.unread = false;
+ m_activity.saveArticleUnread(a);
+ m_feed.unread--;
+ m_activity.refresh(false);
+ }
+ }
+ }
+ }
}
@Override
|