Fixed: Pull-to-refresh was not working when there were no new episodes
This commit is contained in:
parent
583361b19f
commit
f5cbd52fdc
|
@ -261,6 +261,7 @@ public class NewEpisodesFragment extends Fragment {
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
getActivity().supportInvalidateOptionsMenu();
|
getActivity().supportInvalidateOptionsMenu();
|
||||||
updateProgressBarVisibility();
|
updateProgressBarVisibility();
|
||||||
|
updateShowOnlyEpisodesListViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private DownloadObserver.Callback downloadObserverCallback = new DownloadObserver.Callback() {
|
private DownloadObserver.Callback downloadObserverCallback = new DownloadObserver.Callback() {
|
||||||
|
@ -368,6 +369,16 @@ public class NewEpisodesFragment extends Fragment {
|
||||||
if (itemsLoaded && viewsCreated) {
|
if (itemsLoaded && viewsCreated) {
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
activity.get().supportInvalidateOptionsMenu();
|
activity.get().supportInvalidateOptionsMenu();
|
||||||
|
updateShowOnlyEpisodesListViewState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateShowOnlyEpisodesListViewState() {
|
||||||
|
if (showOnlyNewEpisodes) {
|
||||||
|
listView.setEmptyView(null);
|
||||||
|
txtvEmpty.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
listView.setEmptyView(txtvEmpty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue