fix: genre sorting
This commit is contained in:
parent
4838e69aea
commit
bdbbe62570
2 changed files with 5 additions and 4 deletions
|
@ -750,7 +750,7 @@ class AnilistQueries {
|
|||
}
|
||||
}
|
||||
return if (!genres.isNullOrEmpty() && tags != null) {
|
||||
Anilist.genres = genres
|
||||
Anilist.genres = genres?.sortedBy { it }?.toMutableList() as ArrayList<String>
|
||||
Anilist.tags = tags
|
||||
true
|
||||
} else false
|
||||
|
|
|
@ -67,11 +67,12 @@ class GenreActivity : AppCompatActivity() {
|
|||
|
||||
private fun loadLocalGenres(): ArrayList<String>? {
|
||||
val genres = PrefManager.getVal<Set<String>>(PrefName.GenresList)
|
||||
.toMutableList() as ArrayList<String>?
|
||||
return if (genres.isNullOrEmpty()) {
|
||||
.toMutableList()
|
||||
return if (genres.isEmpty()) {
|
||||
null
|
||||
} else {
|
||||
genres
|
||||
//sort alphabetically
|
||||
genres.sort().let { genres as ArrayList<String> }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue