diff --git a/main.js b/main.js index 69dc3bd..4fdbf35 100644 --- a/main.js +++ b/main.js @@ -127,6 +127,7 @@ class OrgTodoListView extends ItemView { cb.addEventListener("change", () => { this.showDone = cb.checked; this.renderList(); + this.renderTagBar(); }); this.tagBarEl = root.createDiv({ cls: "org-todo-tagbar" }); @@ -224,7 +225,10 @@ class OrgTodoListView extends ItemView { // Every tag in the vault — the chip bar is a stable, complete palette. const all = new Set(); - for (const t of this.tasks) t.tags.forEach((x) => all.add(x)); + for (const t of this.tasks) { + if (!this.showDone && t.done) continue; + t.tags.forEach((x) => all.add(x)); + } // Prune active filters whose tag no longer exists (the ghost-filter fix). for (const tag of [...this.activeTags]) {