mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23:33 +00:00
feat: implemented last set filter as default grouping for downloaded tracks
This commit is contained in:
parent
01e5917642
commit
4a99c7e9b1
3 changed files with 25 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ object Preferences {
|
|||
private const val REPLAY_GAIN_MODE = "replay_gain_mode"
|
||||
private const val AUDIO_TRANSCODE_PRIORITY = "audio_transcode_priority"
|
||||
private const val DOWNLOAD_STORAGE = "download_storage"
|
||||
private const val DEFAULT_DOWNLOAD_VIEW_TYPE = "default_download_view_type"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
|
|
@ -272,4 +273,20 @@ object Preferences {
|
|||
storagePreference.toString()
|
||||
).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getDefaultDownloadViewType(): String {
|
||||
return App.getInstance().preferences.getString(
|
||||
DEFAULT_DOWNLOAD_VIEW_TYPE,
|
||||
Constants.DOWNLOAD_TYPE_TRACK
|
||||
)!!
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setDefaultDownloadViewType(viewType: String) {
|
||||
return App.getInstance().preferences.edit().putString(
|
||||
DEFAULT_DOWNLOAD_VIEW_TYPE,
|
||||
viewType
|
||||
).apply()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue