mark read on scroll: don't forget the last item
This commit is contained in:
parent
583578fe8a
commit
6b769ff610
@ -416,7 +416,7 @@ public class HeadlinesFragment extends Fragment {
|
|||||||
|
|
||||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false) && firstVisibleItem > m_adapter.getHeaderCount()) {
|
if (m_prefs.getBoolean("headlines_mark_read_scroll", false) && firstVisibleItem > m_adapter.getHeaderCount()) {
|
||||||
|
|
||||||
if (firstVisibleItem <= m_articles.size()) {
|
if (firstVisibleItem <= m_articles.size() + m_adapter.getHeaderCount()) {
|
||||||
|
|
||||||
Article a = (Article) m_articles.get(firstVisibleItem - m_adapter.getHeaderCount() - 1);
|
Article a = (Article) m_articles.get(firstVisibleItem - m_adapter.getHeaderCount() - 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user