diff options
author | Erik Johnson <palehose@gmail.com> | 2023-02-22 14:34:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 21:34:43 +0100 |
commit | 9fed944392ee31f00ef91a01a2c34dddc876a86a (patch) | |
tree | 198a5618feacc5fbc847fae378bdaa6bbaec032c /storage/preferences/src | |
parent | 5c79bc7c4541fbc0788d03adf3c56b483f96dcdb (diff) | |
download | AntennaPod-9fed944392ee31f00ef91a01a2c34dddc876a86a.zip |
Add "New Episodes Action" preference (#6095)
Diffstat (limited to 'storage/preferences/src')
-rw-r--r-- | storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java index c7758d40e..37cfb4f19 100644 --- a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java +++ b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java @@ -13,6 +13,7 @@ import androidx.annotation.VisibleForTesting; import androidx.core.app.NotificationCompat; import androidx.preference.PreferenceManager; +import de.danoeh.antennapod.model.feed.FeedPreferences; import org.json.JSONArray; import org.json.JSONException; @@ -67,6 +68,7 @@ public class UserPreferences { public static final String PREF_QUEUE_KEEP_SORTED = "prefQueueKeepSorted"; public static final String PREF_QUEUE_KEEP_SORTED_ORDER = "prefQueueKeepSortedOrder"; + public static final String PREF_NEW_EPISODES_ACTION = "prefNewEpisodesAction"; private static final String PREF_DOWNLOADS_SORTED_ORDER = "prefDownloadSortedOrder"; // Playback @@ -944,6 +946,12 @@ public class UserPreferences { .apply(); } + public static FeedPreferences.NewEpisodesAction getNewEpisodesAction() { + String str = prefs.getString(PREF_NEW_EPISODES_ACTION, + "" + FeedPreferences.NewEpisodesAction.ADD_TO_INBOX.code); + return FeedPreferences.NewEpisodesAction.fromCode(Integer.parseInt(str)); + } + /** * Returns the sort order for the downloads. */ |