Skip to content

Commit

Permalink
Discover sorts categories alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie23 committed May 8, 2023
1 parent 0815969 commit d7fbc6b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ internal class DiscoverAdapter(
holder.recyclerView?.adapter = adapter
holder.loadSingle(
service.getCategoriesList(row.source),
onSuccess = {
adapter.submitList(it) { onRestoreInstanceState(holder) }
onSuccess = { categories ->
adapter.submitList(categories.sortedBy { it.name.tryToLocalise(resources) }) {
onRestoreInstanceState(holder)
}
}
)
}
Expand Down

0 comments on commit d7fbc6b

Please sign in to comment.