mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-12 08:44:21 +01:00
check if we have any caldav colors before making them distinct
This commit is contained in:
parent
6abbc3f43c
commit
6597e1c51a
@ -188,7 +188,9 @@ class CalDAVHandler(val context: Context) {
|
||||
|
||||
var sortedColors = ArrayList<Int>(colors.size())
|
||||
(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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user