set article unread after it has been selected in headlines list

This commit is contained in:
Andrew Dolgov 2015-02-12 21:03:16 +03:00
parent d544ea7689
commit b099a8e030

View File

@ -438,11 +438,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
} */ } */
public void onArticleSelected(Article article, boolean open) { public void onArticleSelected(Article article, boolean open) {
if (article.unread) {
article.unread = false;
saveArticleUnread(article);
}
if (open) { if (open) {
HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES); HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
@ -472,6 +467,11 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
} else { } else {
invalidateOptionsMenu(); invalidateOptionsMenu();
if (article.unread) {
article.unread = false;
saveArticleUnread(article);
}
} }
} }