Checklists in the body, colour from tags, and commit-derived CalVer #4

Merged
bvandeusen merged 73 commits from dev into main 2026-08-29 13:39:45 -04:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit cddaf35280 - Show all commits
@@ -81,7 +81,11 @@ fun derivedTint(id: String): String {
* `known` is passed in rather than read from `NOTE_TINTS` so this file stays free of
* Compose and therefore testable; `noteTintFor` supplies the real set.
*/
fun resolvedNoteColor(id: String, color: String, known: Set<String>): String =
fun resolvedNoteColor(
id: String,
color: String,
known: Set<String>,
): String =
when {
color.isNotEmpty() && color != "default" && color in known -> color
// A draft carries DRAFT_ID (""), so there is no identity to derive from yet.
@@ -185,5 +185,7 @@ fun noteTint(key: String): NoteTint = NOTE_TINTS[key] ?: NOTE_TINTS.getValue("de
*/
@Composable
@ReadOnlyComposable
fun noteTintFor(id: String, color: String): NoteTint =
noteTint(resolvedNoteColor(id, color, NOTE_TINTS.keys))
fun noteTintFor(
id: String,
color: String,
): NoteTint = noteTint(resolvedNoteColor(id, color, NOTE_TINTS.keys))