summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/activity
diff options
context:
space:
mode:
authorTony Tam <149837+tonytamsf@users.noreply.github.com>2021-02-14 03:18:27 -0800
committerGitHub <noreply@github.com>2021-02-14 12:18:27 +0100
commitf57cf0c31788962300413a97eefdf746476e2177 (patch)
treef31175de54e92a709ae04e15f9ac54bf531febe5 /app/src/main/java/de/danoeh/antennapod/activity
parentcca5a8a624f0d3529c99975f2440321a3b8872f4 (diff)
downloadAntennaPod-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.java10
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");
});
}