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
Showing only changes of commit 20e9d535de - Show all commits
@@ -237,8 +237,7 @@ fun noteTintFor(note: Note): NoteTint =
* Not `@Composable`: the card needs it alongside `isSystemInDarkTheme()`, and keeping * Not `@Composable`: the card needs it alongside `isSystemInDarkTheme()`, and keeping
* it an ordinary function means it can be read anywhere the note is. * it an ordinary function means it can be read anywhere the note is.
*/ */
fun noteIsStrong(note: Note): Boolean = fun noteIsStrong(note: Note): Boolean = noteColorIsChosen(note.color, firstLabelColor(note), NOTE_TINTS.keys)
noteColorIsChosen(note.color, firstLabelColor(note), NOTE_TINTS.keys)
/** /**
* The colour of the note's FIRST label, already resolved, or "" when it has none. * The colour of the note's FIRST label, already resolved, or "" when it has none.
@@ -249,10 +248,10 @@ fun noteIsStrong(note: Note): Boolean =
* a chip cannot tell which kind they made, and two identically-tagged notes in * a chip cannot tell which kind they made, and two identically-tagged notes in
* different colours for an invisible reason is worse than the rule being loose. * different colours for an invisible reason is worse than the rule being loose.
*/ */
private fun firstLabelColor(note: Note): String = private fun firstLabelColor(note: Note): String {
note.labels.firstOrNull() val first = note.labels.firstOrNull() ?: return ""
?.let { resolvedLabelColor(it.name, it.color, NOTE_TINTS.keys) } return resolvedLabelColor(first.name, first.color, NOTE_TINTS.keys)
?: "" }
/** /**
* The tint for a LABEL, derived from its name when nobody has picked one. * The tint for a LABEL, derived from its name when nobody has picked one.