mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
check if we have any caldav colors before making them distinct
This commit is contained in:
@@ -188,7 +188,9 @@ class CalDAVHandler(val context: Context) {
|
|||||||
|
|
||||||
var sortedColors = ArrayList<Int>(colors.size())
|
var sortedColors = ArrayList<Int>(colors.size())
|
||||||
(0 until colors.size()).mapTo(sortedColors) { colors[it] }
|
(0 until colors.size()).mapTo(sortedColors) { colors[it] }
|
||||||
sortedColors = sortedColors.distinct() as ArrayList<Int>
|
if (sortedColors.isNotEmpty()) {
|
||||||
|
sortedColors = sortedColors.distinct() as ArrayList<Int>
|
||||||
|
}
|
||||||
|
|
||||||
return sortedColors
|
return sortedColors
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user