diff options
author | Petar Kukolj <petarkukolj3@yahoo.com> | 2018-11-29 21:23:36 +0100 |
---|---|---|
committer | Petar Kukolj <petarkukolj3@yahoo.com> | 2018-11-29 21:56:29 +0100 |
commit | a1f81d4144bacc01ed7f65efc3daaa063c8f32d6 (patch) | |
tree | ad4ca5515711a1349a3e2c9de940d1ba7de627bb /core | |
parent | e70a9001dc08c02a51ddda7251387840c2f3ed46 (diff) | |
download | AntennaPod-a1f81d4144bacc01ed7f65efc3daaa063c8f32d6.zip |
Add delete option to episode's context menu
This PR makes following changes:
- Adds delete option to episode's context menus in queue and feed list
- Adds a storage preference that allows episodes to be automatically removed from queue when they are deleted (by clicking delete in context menu,
or pressing trash can icon on `Completed` tab of `Downloads` page)
- Adds a test for the aforementioned preference
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java | 5 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index c44999c88..791ecfa1b 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -100,6 +100,7 @@ public class UserPreferences { // Other private static final String PREF_DATA_FOLDER = "prefDataFolder"; public static final String PREF_IMAGE_CACHE_SIZE = "prefImageCacheSize"; + public static final String PREF_DELETE_REMOVES_FROM_QUEUE = "prefDeleteRemovesFromQueue"; // Mediaplayer public static final String PREF_MEDIA_PLAYER = "prefMediaPlayer"; @@ -309,6 +310,10 @@ public class UserPreferences { return Integer.parseInt(prefs.getString(PREF_SMART_MARK_AS_PLAYED_SECS, "30")); } + public static boolean shouldDeleteRemoveFromQueue() { + return prefs.getBoolean(PREF_DELETE_REMOVES_FROM_QUEUE, false); + } + public static boolean isAutoFlattr() { return prefs.getBoolean(PREF_AUTO_FLATTR, false); } diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 1a3c2373c..db7b140b1 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -481,6 +481,8 @@ <string name="double_tap_toast">Tap back button again to exit</string> <string name="back_button_go_to_page">Go to page</string> <string name="back_button_go_to_page_title">Select page</string> + <string name="pref_delete_removes_from_queue_title">Delete Removes From Queue</string> + <string name="pref_delete_removes_from_queue_sum">Automatically remove an episode from queue when it is deleted.</string> <!-- Auto-Flattr dialog --> <string name="auto_flattr_enable">Enable automatic flattring</string> |