From ab184cb5bdf99feb83f591fbe810cf394ca2ba36 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 27 Mar 2013 13:57:59 +0400 Subject: [PATCH] enlarge maximum amount of articles in headline buffer modify catchup_above to exclude current article for consistency fix catchup_above to only work on actually unread article (closes #632) --- src/org/fox/ttrss/HeadlinesFragment.java | 11 +++++++---- src/org/fox/ttrss/util/HeadlinesRequest.java | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 438d7b4e..8c2b8aa8 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -205,10 +205,13 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, ArticleList articles = getAllArticles(); ArticleList tmp = new ArticleList(); for (Article a : articles) { - a.unread = false; - tmp.add(a); - if (article.id == a.id) - break; + if (a.unread) { + if (article.id == a.id) + break; + + a.unread = false; + tmp.add(a); + } } if (tmp.size() > 0) { m_activity.toggleArticlesUnread(tmp); diff --git a/src/org/fox/ttrss/util/HeadlinesRequest.java b/src/org/fox/ttrss/util/HeadlinesRequest.java index fe323d25..ca76887f 100644 --- a/src/org/fox/ttrss/util/HeadlinesRequest.java +++ b/src/org/fox/ttrss/util/HeadlinesRequest.java @@ -19,7 +19,7 @@ import com.google.gson.reflect.TypeToken; public class HeadlinesRequest extends ApiRequest { public static final int HEADLINES_REQUEST_SIZE = 30; - public static final int HEADLINES_BUFFER_MAX = 500; + public static final int HEADLINES_BUFFER_MAX = 1500; private int m_offset = 0; private OnlineActivity m_activity;