diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/calendars/CalendarsScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/calendars/CalendarsScreen.kt index f3eee80b..60b9b174 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/calendars/CalendarsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/calendars/CalendarsScreen.kt @@ -436,6 +436,7 @@ internal fun CalendarEditor( .filter { (it in hiddenViews) != (it in seededHiddenViews) } .associateWith { it in hiddenViews } onSave(name.trim(), color, description.trim().ifEmpty { null }, changes) + if (!sameColor(color, initialColor) && CalendarColorPalette.presetOf(color) == null) onCustomColorUsed(color) } } @@ -478,10 +479,7 @@ internal fun CalendarEditor( selected = color, recents = recentColors, onSelect = { color = it }, - onSelectRecent = { - color = it - onCustomColorUsed(it) - }, + onSelectRecent = { color = it }, ) Spacer(Modifier.height(8.dp)) CustomColorRow(customColor = customColor, onClick = { pickCustomColor = true }) @@ -523,7 +521,6 @@ internal fun CalendarEditor( initial = color, onPick = { color = it - onCustomColorUsed(it) pickCustomColor = false }, onDismiss = { pickCustomColor = false },