From b7e5436576be1b84225b9e2e8c7ca32dfb55822c Mon Sep 17 00:00:00 2001 From: Erik Hardesty Date: Sat, 30 Mar 2013 17:58:55 -0500 Subject: [PATCH] Add mark read on scroll for headlines --- res/values/strings.xml | 2 ++ res/xml/preferences.xml | 4 ++++ src/org/fox/ttrss/HeadlinesFragment.java | 14 ++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index 5e96736a..5d9c7c58 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -186,4 +186,6 @@ Starred Published Unread + Mark read on scroll + Headlines will be marked read when scrolling past them diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 74d284f9..095f52cb 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -92,6 +92,10 @@ android:key="headlines_show_content" android:summary="@string/pref_headlines_show_content_long" android:title="@string/pref_headlines_show_content" /> + 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