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
* it an ordinary function means it can be read anywhere the note is.
*/
fun noteIsStrong(note: Note): Boolean =
noteColorIsChosen(note.color, firstLabelColor(note), NOTE_TINTS.keys)
fun noteIsStrong(note: Note): Boolean = noteColorIsChosen(note.color, firstLabelColor(note), NOTE_TINTS.keys)
/**
* 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
* different colours for an invisible reason is worse than the rule being loose.
*/
private fun firstLabelColor(note: Note): String =
note.labels.firstOrNull()
?.let { resolvedLabelColor(it.name, it.color, NOTE_TINTS.keys) }
?: ""
private fun firstLabelColor(note: Note): String {
val first = note.labels.firstOrNull() ?: return ""
return resolvedLabelColor(first.name, first.color, NOTE_TINTS.keys)
}
/**
* The tint for a LABEL, derived from its name when nobody has picked one.