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 {
|
||||
try {
|
||||
val response = service.getPokemon()
|
||||
_initialPokemonList.value = response.results
|
||||
_initialPokemonList.value = response.results.sortedBy { it.name.lowercase() }
|
||||
} catch (e: IOException) {
|
||||
/*TODO*/
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user