have a function: ``` private fun mapCategories(cur...
# android
m
have a function:
Copy code
private fun mapCategories(currencyCode: String, categories: List<Category>,
                          categoriesMap: Map<String, Double>): List<AnalyticsEntry> {
    val amountSum = categoriesMap.values.sum()
    return categories.map {
        AnalyticsEntry(it, emptyList(), categoriesMap[it.guid] ?: 0.0, currencyCode, getAmountPercent(categoriesMap[it.guid] ?: 0.0, amountSum))
    }.sortedByDescending { Math.abs(it.amount) }
}
need to add one more sort. How i can to do this?