diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-26 18:49:25 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-26 18:49:25 +0100 |
commit | 8944a61e3de9e391acf3d75bdf0565a88f9d7143 (patch) | |
tree | 45479a92155f2edf29c406c71ea53c52129f6f73 /app | |
parent | 748a6c274567b0280ed8fc109bac6fc58f522998 (diff) | |
download | AntennaPod-8944a61e3de9e391acf3d75bdf0565a88f9d7143.zip |
New select criteria: queued, not queued
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 19 | ||||
-rw-r--r-- | app/src/main/res/menu/episodes_apply_action_options.xml | 4 |
2 files changed, 23 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 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"/> <item android:id="@+id/check_not_downloaded" android:title="@string/not_downloaded_label"/> + <item android:id="@+id/check_queued" + android:title="@string/queued_label"/> + <item android:id="@+id/check_not_queued" + android:title="@string/not_queued_label"/> </menu> </item> |