Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Oct 4, 2020
1 parent 500b29b commit ca553b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/luwrain/app/news/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ boolean markAsRead(StoredNewsArticle article)
NullCheck.notNull(article, "article");
try {
if (article.getState() == NewsArticle.NEW)
{
article.setState(NewsArticle.READ);
article.save();
}
return true;
}
catch (Exception e)
Expand All @@ -96,7 +99,10 @@ boolean markAsReadWholeGroup(StoredNewsGroup group)
return true;
for(StoredNewsArticle a: articles)
if (a.getState() == NewsArticle.NEW)
{
a.setState(NewsArticle.READ);
a.save();
}
return true;
}
catch (PimException e)
Expand All @@ -116,6 +122,7 @@ boolean toggleArticleMark(int index)
if (article.getState() == NewsArticle.MARKED)
article.setState(NewsArticle.READ); else
article.setState(NewsArticle.MARKED);
article.save();
return true;
}
catch (PimException e)
Expand Down

0 comments on commit ca553b5

Please sign in to comment.