Fix #246 Metadata is not hidden when "Show metadata" is disabled

This commit is contained in:
Alan Grainger
2026-06-09 09:30:36 +12:00
parent b40383e72e
commit e436fd36fb
4 changed files with 29 additions and 12 deletions
+5
View File
@@ -77,6 +77,11 @@ function groupItemsByMonth (): GroupSpec[] {
}
g.indices.push(i)
}
// When every item is undated (typically because the share's "Show metadata"
// toggle stripped dates upstream), drop the lone "Undated" header
if (map.size === 1 && map.has('undated')) {
map.get('undated')!.label = null
}
return Array.from(map.values())
}