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(tree): not reacting to protected state changes
Elian Doran9aa84877ee3e
diff --git a/apps/client/src/services/froca_updater.ts b/apps/client/src/services/froca_updater.tsindex 6d6ef9213d..ca6c792746 100644--- a/apps/client/src/services/froca_updater.ts+++ b/apps/client/src/services/froca_updater.ts@@ -110,7 +110,12 @@ function processNoteChange(loadResults: LoadResults, ec: EntityChange) {}}- if (ec.componentId) {+ // Only register as a content change if the protection status didn't change.+ // When isProtected changes, the blobId change is a side effect of re-encryption,+ // not a content edit. Registering it as content would cause the tree's content-only+ // filter to incorrectly skip the note update (since both changes share the same+ // componentId).+ if (ec.componentId && note.isProtected === (ec.entity as FNoteRow).isProtected) {loadResults.addNoteContent(note.noteId, ec.componentId);}}