From 8944a61e3de9e391acf3d75bdf0565a88f9d7143 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 26 Jan 2016 18:49:25 +0100 Subject: New select criteria: queued, not queued --- .../dialog/EpisodesApplyActionFragment.java | 19 +++++++++++++++++++ .../main/res/menu/episodes_apply_action_options.xml | 4 ++++ 2 files changed, 23 insertions(+) (limited to 'app') 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 fdd49e895..a323b868f 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -178,6 +178,14 @@ public class EpisodesApplyActionFragment extends Fragment { checkDownloaded(false); resId = R.string.selected_not_downloaded_label; break; + case R.id.check_queued: + checkQueued(true); + resId = R.string.selected_queued_label; + break; + case R.id.check_not_queued: + checkQueued(false); + resId = R.string.selected_not_queued_label; + break; case R.id.sort_title_a_z: sortByTitle(false); return true; @@ -299,6 +307,17 @@ public class EpisodesApplyActionFragment extends Fragment { refreshCheckboxes(); } + private void checkQueued(boolean isQueued) { + for (FeedItem episode : episodes) { + if(episode.isTagged(FeedItem.TAG_QUEUE) == isQueued) { + checkedIds.add(episode.getId()); + } else { + checkedIds.remove(episode.getId()); + } + } + refreshCheckboxes(); + } + private void refreshTitles() { titles.clear(); for(FeedItem episode : episodes) { diff --git a/app/src/main/res/menu/episodes_apply_action_options.xml b/app/src/main/res/menu/episodes_apply_action_options.xml index 90cba0966..3df88046d 100644 --- a/app/src/main/res/menu/episodes_apply_action_options.xml +++ b/app/src/main/res/menu/episodes_apply_action_options.xml @@ -42,6 +42,10 @@ android:title="@string/downloaded_label"/> + + -- cgit v1.2.3