move to user preferences
This commit is contained in:
parent
7c76d2c57b
commit
46252ce663
|
@ -43,9 +43,6 @@ public class PlaybackPreferences implements
|
||||||
/** True if last played media was a video. */
|
/** True if last played media was a video. */
|
||||||
public static final String PREF_CURRENT_EPISODE_IS_VIDEO = "de.danoeh.antennapod.preferences.lastIsVideo";
|
public static final String PREF_CURRENT_EPISODE_IS_VIDEO = "de.danoeh.antennapod.preferences.lastIsVideo";
|
||||||
|
|
||||||
/** Value of PREF_QUEUE_ADD_TO_FRONT if no media is playing. */
|
|
||||||
public static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront";
|
|
||||||
|
|
||||||
/** Value of PREF_CURRENTLY_PLAYING_MEDIA if no media is playing. */
|
/** Value of PREF_CURRENTLY_PLAYING_MEDIA if no media is playing. */
|
||||||
public static final long NO_MEDIA_PLAYING = -1;
|
public static final long NO_MEDIA_PLAYING = -1;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class UserPreferences implements
|
||||||
private static final String PREF_SEEK_DELTA_SECS = "prefSeekDeltaSecs";
|
private static final String PREF_SEEK_DELTA_SECS = "prefSeekDeltaSecs";
|
||||||
private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
|
private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
|
||||||
private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
|
private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
|
||||||
|
public static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront";
|
||||||
|
|
||||||
// TODO: Make this value configurable
|
// TODO: Make this value configurable
|
||||||
private static final float PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD_DEFAULT = 0.8f;
|
private static final float PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD_DEFAULT = 0.8f;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import de.danoeh.antennapod.core.asynctask.FlattrClickWorker;
|
||||||
import de.danoeh.antennapod.core.feed.*;
|
import de.danoeh.antennapod.core.feed.*;
|
||||||
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
||||||
import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
|
import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
|
||||||
|
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||||
import de.danoeh.antennapod.core.util.QueueAccess;
|
import de.danoeh.antennapod.core.util.QueueAccess;
|
||||||
|
@ -379,7 +380,7 @@ public class DBWriter {
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
// add item to either front ot back of queue
|
// add item to either front ot back of queue
|
||||||
boolean addToFront = PreferenceManager.getDefaultSharedPreferences(context)
|
boolean addToFront = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
.getBoolean(PlaybackPreferences.PREF_QUEUE_ADD_TO_FRONT, false);
|
.getBoolean(UserPreferences.PREF_QUEUE_ADD_TO_FRONT, false);
|
||||||
|
|
||||||
if(addToFront){
|
if(addToFront){
|
||||||
queue.add(0, item);
|
queue.add(0, item);
|
||||||
|
|
Loading…
Reference in New Issue