fix(#199): review - custom colour joins the recents on save

This commit is contained in:
makiolaj committed 2026-12-02 18:10:47 +01:00
1 parent 32213d46f8
commit 7e3ab23f9b
1 file changed
+2 -5
@@ -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 },