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:
parent
65e76c35b8
commit
ab184cb5bd
@ -205,10 +205,13 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
ArticleList articles = getAllArticles();
|
ArticleList articles = getAllArticles();
|
||||||
ArticleList tmp = new ArticleList();
|
ArticleList tmp = new ArticleList();
|
||||||
for (Article a : articles) {
|
for (Article a : articles) {
|
||||||
a.unread = false;
|
if (a.unread) {
|
||||||
tmp.add(a);
|
if (article.id == a.id)
|
||||||
if (article.id == a.id)
|
break;
|
||||||
break;
|
|
||||||
|
a.unread = false;
|
||||||
|
tmp.add(a);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (tmp.size() > 0) {
|
if (tmp.size() > 0) {
|
||||||
m_activity.toggleArticlesUnread(tmp);
|
m_activity.toggleArticlesUnread(tmp);
|
||||||
|
@ -19,7 +19,7 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
|
|
||||||
public class HeadlinesRequest extends ApiRequest {
|
public class HeadlinesRequest extends ApiRequest {
|
||||||
public static final int HEADLINES_REQUEST_SIZE = 30;
|
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 int m_offset = 0;
|
||||||
private OnlineActivity m_activity;
|
private OnlineActivity m_activity;
|
||||||
|
Loading…
Reference in New Issue
Block a user