Kotlin allows me to sort ASC and array using multiple comparison fields.
For example:
return ArrayList(originalItems)
.sortedWith(compareBy({ it.localHits }, { it.title }))
But when I try sort DESC (compareByDescending()
), it does not allow me to use multiple comparison fields.
Is there any way I can do it?