mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
chg: Move the playlist duplicates option to preferences
As per the recommendation of @eddyizm
This commit is contained in:
parent
a22883fdde
commit
1c2f1aa061
6 changed files with 43 additions and 28 deletions
|
|
@ -69,6 +69,7 @@ object Preferences {
|
|||
private const val NEXT_UPDATE_CHECK = "next_update_check"
|
||||
private const val CONTINUOUS_PLAY = "continuous_play"
|
||||
private const val LAST_INSTANT_MIX = "last_instant_mix"
|
||||
private const val ALLOW_PLAYLIST_DUPLICATES = "allow_playlist_duplicates"
|
||||
|
||||
|
||||
@JvmStatic
|
||||
|
|
@ -538,4 +539,17 @@ object Preferences {
|
|||
LAST_INSTANT_MIX, 0
|
||||
) + 5000 < System.currentTimeMillis()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setAllowPlaylistDuplicates(allowDuplicates: Boolean) {
|
||||
return App.getInstance().preferences.edit().putString(
|
||||
ALLOW_PLAYLIST_DUPLICATES,
|
||||
allowDuplicates.toString()
|
||||
).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun allowPlaylistDuplicates(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(ALLOW_PLAYLIST_DUPLICATES, false)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue