forked from mirror/crumbs-original
fix: exclude archived/trashed notes from tag list
The allTags derived store now filters out archived and trashed notes before collecting tags, so the sidebar tag filter only shows tags that yield visible results. Closes #9 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
7f42bc616d
commit
1725db41ce
@@ -37,7 +37,9 @@ export const unpinnedNotes = derived(filteredNotes, ($notes) =>
|
||||
|
||||
export const allTags = derived(notes, ($notes) => {
|
||||
const tagSet = new Set<string>();
|
||||
$notes.forEach((n) => n.tags?.forEach((t) => tagSet.add(t)));
|
||||
$notes
|
||||
.filter((n) => !n.archived && !n.trashed)
|
||||
.forEach((n) => n.tags?.forEach((t) => tagSet.add(t)));
|
||||
return [...tagSet].sort();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user