mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
feat: save user's layout choice and always use user preference
This commit is contained in:
parent
ae8aa56602
commit
cd44368d66
2 changed files with 18 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ object Preferences {
|
|||
private const val BUFFERING_STRATEGY = "buffering_strategy"
|
||||
private const val SKIP_MIN_STAR_RATING = "skip_min_star_rating"
|
||||
private const val MIN_STAR_RATING = "min_star_rating"
|
||||
private const val ARTIST_ALBUM_LAYOUT = "artist_album_layout"
|
||||
|
||||
|
||||
@JvmStatic
|
||||
|
|
@ -345,4 +346,15 @@ object Preferences {
|
|||
fun getMinStarRatingAccepted(): Int {
|
||||
return App.getInstance().preferences.getInt(MIN_STAR_RATING, 0)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isArtistAlbumLayoutHorizontal(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(ARTIST_ALBUM_LAYOUT, true)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setArtistAlbumLayout(isArtistAlbumLayoutHorizontal: Boolean) {
|
||||
App.getInstance().preferences.edit().putBoolean(ARTIST_ALBUM_LAYOUT, isArtistAlbumLayoutHorizontal)
|
||||
.apply()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue