summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java18
-rw-r--r--core/src/main/res/values/strings.xml2
2 files changed, 20 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 807348896..cbfe28ded 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
@@ -62,6 +62,7 @@ public class UserPreferences {
private static final String PREF_DRAWER_FEED_COUNTER = "prefDrawerFeedIndicator";
public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
public static final String PREF_USE_EPISODE_COVER = "prefEpisodeCover";
+ public static final String PREF_SHOW_TIME_LEFT = "showTimeLeft";
private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
public static final String PREF_COMPACT_NOTIFICATION_BUTTONS = "prefCompactNotificationButtons";
public static final String PREF_LOCKSCREEN_BACKGROUND = "prefLockscreenBackground";
@@ -268,6 +269,23 @@ public class UserPreferences {
}
/**
+ * @return {@code true} if we should show remaining time or the duration
+ */
+ public static boolean shouldShowRemainingTime() {
+ return prefs.getBoolean(PREF_SHOW_TIME_LEFT, false);
+ }
+
+ /**
+ * Sets the preference for whether we show the remain time, if not show the duration. This will
+ * send out events so the current playing screen, queue and the episode list would refresh
+ *
+ * @return {@code true} if we should show remaining time or the duration
+ */
+ public static void setShowRemainTimeSetting(Boolean showRemain) {
+ prefs.edit().putBoolean(PREF_SHOW_TIME_LEFT, showRemain).apply();
+ }
+
+ /**
* Returns notification priority.
*
* @return NotificationCompat.PRIORITY_MAX or NotificationCompat.PRIORITY_DEFAULT
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 91ec75782..fc080d71f 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -458,6 +458,8 @@
<string name="pref_episode_cache_summary">Total number of downloaded episodes cached on the device. Automatic download will be suspended if this number is reached.</string>
<string name="pref_episode_cover_title">Use Episode Cover</string>
<string name="pref_episode_cover_summary">Use the episode specific cover whenever available. If unchecked, the app will always use the podcast cover image.</string>
+ <string name="pref_show_remain_time_title">Show Remaining Time</string>
+ <string name="pref_show_remain_time_summary">Display remaining time of episodes when checked. If unchecked, display total duration of episodes.</string>
<string name="pref_theme_title_use_system">Use system theme</string>
<string name="pref_theme_title_light">Light</string>
<string name="pref_theme_title_dark">Dark</string>