diff options
4 files changed, 10 insertions, 1 deletions
diff --git a/core/src/main/res/values/arrays.xml b/core/src/main/res/values/arrays.xml index 0ae8cf96e..011edda17 100644 --- a/core/src/main/res/values/arrays.xml +++ b/core/src/main/res/values/arrays.xml @@ -178,12 +178,14 @@ <item>@string/drawer_feed_counter_inbox</item> <item>@string/drawer_feed_counter_unplayed</item> <item>@string/drawer_feed_counter_downloaded</item> + <item>@string/drawer_feed_counter_downloaded_unplayed</item> <item>@string/drawer_feed_counter_none</item> </string-array> <string-array name="nav_drawer_feed_counter_values"> <item>1</item> <item>2</item> <item>4</item> + <item>5</item> <item>3</item> </string-array> diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedCounter.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedCounter.java index 0cf6e0858..5923f1f13 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedCounter.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedCounter.java @@ -4,7 +4,8 @@ public enum FeedCounter { SHOW_NEW(1), SHOW_UNPLAYED(2), SHOW_NONE(3), - SHOW_DOWNLOADED(4); + SHOW_DOWNLOADED(4), + SHOW_DOWNLOADED_UNPLAYED(5); public final int id; diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java index 3cf7e37dc..9798a9fb3 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java @@ -1281,6 +1281,11 @@ public class PodDBAdapter { case SHOW_DOWNLOADED: whereRead = KEY_DOWNLOADED + "=1"; break; + case SHOW_DOWNLOADED_UNPLAYED: + whereRead = "(" + KEY_READ + "=" + FeedItem.NEW + + " OR " + KEY_READ + "=" + FeedItem.UNPLAYED + ")" + + " AND " + KEY_DOWNLOADED + "=1"; + break; case SHOW_NONE: // deliberate fall-through default: // NONE diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml index d6b80f6fd..a2aa6ecef 100644 --- a/ui/i18n/src/main/res/values/strings.xml +++ b/ui/i18n/src/main/res/values/strings.xml @@ -76,6 +76,7 @@ <string name="drawer_feed_counter_inbox">Number of episodes in the inbox</string> <string name="drawer_feed_counter_unplayed">Number of unplayed episodes</string> <string name="drawer_feed_counter_downloaded">Number of downloaded episodes</string> + <string name="drawer_feed_counter_downloaded_unplayed">Number of downloaded and unplayed episodes</string> <string name="drawer_feed_counter_none">None</string> <!-- Bug report activity --> |