Sort the list alphabetticaly for bin search
This commit is contained in:
parent
0ebf26c457
commit
fd122ec376
@ -29,7 +29,7 @@ class PokeSearchViewModel(private val favouritesRepository: FavouritesRepository
|
|||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
val response = service.getPokemon()
|
val response = service.getPokemon()
|
||||||
_initialPokemonList.value = response.results
|
_initialPokemonList.value = response.results.sortedBy { it.name.lowercase() }
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
/*TODO*/
|
/*TODO*/
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user