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 | |
parent | 748a6c274567b0280ed8fc109bac6fc58f522998 (diff) | |
download | AntennaPod-8944a61e3de9e391acf3d75bdf0565a88f9d7143.zip |
New select criteria: queued, not queued
3 files changed, 27 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> diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index b8f6f7065..86875fc23 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -559,6 +559,10 @@ <string name="selected_downloaded_label">Selected downloaded Episodes</string> <string name="not_downloaded_label">Not downloaded</string> <string name="selected_not_downloaded_label">Selected not downloaded Episodes</string> + <string name="queued_label">Queued</string> + <string name="selected_queued_label">Selected queued Episodes</string> + <string name="not_queued_label">Not queued</string> + <string name="selected_not_queued_label">Selected not queued Episodes</string> <string name="sort_title"><b>Sort by…</b></string> <string name="sort_title_a_z">Title (A \u2192 Z)</string> <string name="sort_title_z_a">Title (Z \u2192 A)</string> |