diff options
author | Tony Tam <149837+tonytamsf@users.noreply.github.com> | 2021-02-14 03:18:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-14 12:18:27 +0100 |
commit | f57cf0c31788962300413a97eefdf746476e2177 (patch) | |
tree | f31175de54e92a709ae04e15f9ac54bf531febe5 /app/src/main/java/de/danoeh/antennapod/activity | |
parent | cca5a8a624f0d3529c99975f2440321a3b8872f4 (diff) | |
download | AntennaPod-f57cf0c31788962300413a97eefdf746476e2177.zip |
New preference to show the remaining time in the 'queue' and podcast episode view (#4880)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/activity')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index a9749bab6..76359ddc0 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -65,7 +65,6 @@ import io.reactivex.schedulers.Schedulers; public abstract class MediaplayerActivity extends CastEnabledActivity implements OnSeekBarChangeListener { private static final String TAG = "MediaplayerActivity"; private static final String PREFS = "MediaPlayerActivityPreferences"; - private static final String PREF_SHOW_TIME_LEFT = "showTimeLeft"; PlaybackController controller; @@ -465,8 +464,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements if(controller == null || controller.getMedia() == null) { return false; } - SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE); - showTimeLeft = prefs.getBoolean(PREF_SHOW_TIME_LEFT, false); + showTimeLeft = UserPreferences.shouldShowRemainingTime(); onPositionObserverUpdate(); checkFavorite(); updatePlaybackSpeedButton(); @@ -489,7 +487,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements txtvSeek = findViewById(R.id.txtvSeek); SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE); - showTimeLeft = prefs.getBoolean(PREF_SHOW_TIME_LEFT, false); + showTimeLeft = UserPreferences.shouldShowRemainingTime(); Log.d("timeleft", showTimeLeft ? "true" : "false"); txtvLength = findViewById(R.id.txtvLength); if (txtvLength != null) { @@ -513,9 +511,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements } txtvLength.setText(length); - SharedPreferences.Editor editor = prefs.edit(); - editor.putBoolean(PREF_SHOW_TIME_LEFT, showTimeLeft); - editor.apply(); + UserPreferences.setShowRemainTimeSetting(showTimeLeft); Log.d("timeleft on click", showTimeLeft ? "true" : "false"); }); } |