diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-05-18 23:58:48 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-05-18 23:58:48 +0200 |
commit | f5cbd52fdc8edec26a5df4ee6add616b9273e437 (patch) | |
tree | 925682d0b690e2666cf35fa48d072da94d80f017 /src/de/danoeh/antennapod/fragment | |
parent | 583361b19fc765bc4dee13ec2b356233a7237c19 (diff) | |
download | AntennaPod-f5cbd52fdc8edec26a5df4ee6add616b9273e437.zip |
Fixed: Pull-to-refresh was not working when there were no new episodes
Diffstat (limited to 'src/de/danoeh/antennapod/fragment')
-rw-r--r-- | src/de/danoeh/antennapod/fragment/NewEpisodesFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/fragment/NewEpisodesFragment.java b/src/de/danoeh/antennapod/fragment/NewEpisodesFragment.java index a420f9d26..0c42bdd65 100644 --- a/src/de/danoeh/antennapod/fragment/NewEpisodesFragment.java +++ b/src/de/danoeh/antennapod/fragment/NewEpisodesFragment.java @@ -261,6 +261,7 @@ public class NewEpisodesFragment extends Fragment { listAdapter.notifyDataSetChanged(); getActivity().supportInvalidateOptionsMenu(); updateProgressBarVisibility(); + updateShowOnlyEpisodesListViewState(); } private DownloadObserver.Callback downloadObserverCallback = new DownloadObserver.Callback() { @@ -368,6 +369,16 @@ public class NewEpisodesFragment extends Fragment { if (itemsLoaded && viewsCreated) { listAdapter.notifyDataSetChanged(); activity.get().supportInvalidateOptionsMenu(); + updateShowOnlyEpisodesListViewState(); + } + } + + private void updateShowOnlyEpisodesListViewState() { + if (showOnlyNewEpisodes) { + listView.setEmptyView(null); + txtvEmpty.setVisibility(View.GONE); + } else { + listView.setEmptyView(txtvEmpty); } } |