mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
Implemented preference for starred-sync support
This commit is contained in:
parent
147560224f
commit
575c77baf9
11 changed files with 168 additions and 5 deletions
|
|
@ -27,6 +27,7 @@ public class PreferenceUtil {
|
|||
public static final String AUDIO_TRANSCODE_FORMAT_MOBILE = "audio_transcode_format_mobile";
|
||||
public static final String WIFI_ONLY = "wifi_only";
|
||||
public static final String DATA_SAVING_MODE = "data_saving_mode";
|
||||
public static final String SYNC_STARRED_TRACKS_FOR_OFFLINE_USE = "sync_starred_tracks_for_offline_use";
|
||||
|
||||
private static PreferenceUtil sInstance;
|
||||
private final SharedPreferences mPreferences;
|
||||
|
|
@ -168,4 +169,14 @@ public class PreferenceUtil {
|
|||
editor.putBoolean(DATA_SAVING_MODE, isDataSavingModeEnabled);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public final boolean isStarredSyncEnabled() {
|
||||
return mPreferences.getBoolean(SYNC_STARRED_TRACKS_FOR_OFFLINE_USE, false);
|
||||
}
|
||||
|
||||
public void setStarredSyncEnabled(Boolean isStarredSyncEnabled) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putBoolean(SYNC_STARRED_TRACKS_FOR_OFFLINE_USE, isStarredSyncEnabled);
|
||||
editor.apply();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue