Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(collections): displaying note list even if session is not unlocked
Elian Doran9e99670b19a8
diff --git a/apps/client/src/components/note_context.ts b/apps/client/src/components/note_context.tsindex afcaaf0918..3ca6a2a792 100644--- a/apps/client/src/components/note_context.ts+++ b/apps/client/src/components/note_context.ts@@ -381,6 +381,10 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">// Collections must always display a note list, even if no children.if (note.type === "book") {+ if (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) {+ return false;+ }+const viewType = note.getLabelValue("viewType") ?? "grid";if (!["list", "grid"].includes(viewType)) {return true;