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)
This commit is contained in:
Andrew Dolgov 2013-03-27 13:57:59 +04:00
parent 65e76c35b8
commit ab184cb5bd
2 changed files with 8 additions and 5 deletions

View File

@ -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);

View File

@ -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;