Skip to content

Commit

Permalink
refresh unread items view after update - fix #892
Browse files Browse the repository at this point in the history
Signed-off-by: David Luhmer <david-dev@live.de>
  • Loading branch information
David-Development committed Nov 11, 2020
1 parent 0a48824 commit b5d3f32
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ private boolean syncFinishedHandler() {
if (newItemsCount > 0) {
int firstVisiblePosition = getNewsReaderDetailFragment().getFirstVisibleScrollPosition();

//Only show the update snackbar if scrollposition is not top.
// Only show the update snackbar if scrollposition is not top.
// 0 if scrolled all the way up
// 1 if no items are visible right now (e.g. first sync)
if (firstVisiblePosition == 0 || firstVisiblePosition == -1) {
Expand All @@ -530,6 +530,11 @@ private boolean syncFinishedHandler() {
showSnackbar(newItemsCount);
}
return true;
} else {
// update rss view even if no new items are available
// If the user just finished reading some articles (e.g. all unread items) - he most
// likely wants the read articles to be removed when the sync is finished
updateCurrentRssView();
}
return false;
}
Expand Down

0 comments on commit b5d3f32

Please sign in to comment.