diff options
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index 577a3ecbe..202d33408 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -225,6 +225,9 @@ public class EpisodesApplyActionFragment extends Fragment { checkQueued(false); resId = R.string.selected_not_queued_label; break; + case R.id.check_has_media: + checkWithMedia(); + resId = R.string.selected_has_media_label; case R.id.sort_title_a_z: sortByTitle(false); return true; @@ -357,6 +360,17 @@ public class EpisodesApplyActionFragment extends Fragment { refreshCheckboxes(); } + private void checkWithMedia() { + for (FeedItem episode : episodes) { + if(episode.hasMedia()) { + checkedIds.add(episode.getId()); + } else { + checkedIds.remove(episode.getId()); + } + } + refreshCheckboxes(); + } + private void refreshTitles() { titles.clear(); for(FeedItem episode : episodes) { |