diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java index 1384b5d78..f5221d47b 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java @@ -426,13 +426,16 @@ public abstract class EpisodesListFragment extends Fragment .observeOn(AndroidSchedulers.mainThread()) .subscribe( data -> { + final boolean restoreScrollPosition = episodes.isEmpty(); episodes = data.first; hasMoreItems = !(page == 1 && episodes.size() < EPISODES_PER_PAGE); progressBar.setVisibility(View.GONE); listAdapter.setDummyViews(0); listAdapter.updateItems(episodes); listAdapter.setTotalNumberOfItems(data.second); - recyclerView.restoreScrollPosition(getPrefName()); + if (restoreScrollPosition) { + recyclerView.restoreScrollPosition(getPrefName()); + } updateToolbar(); }, error -> { listAdapter.setDummyViews(0); |