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
activateNewNote does not reload whole tree anymore
zadam2150619d62ea
diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.htmlindex 9b6acb3a06..491a861008 100644--- a/docs/backend_api/entities_note.js.html+++ b/docs/backend_api/entities_note.js.html@@ -553,7 +553,7 @@ class Note extends Entity {const attributes = await this.loadOwnedAttributesToCache();for (const attribute of attributes) {- if (attribute.type === type && (value === undefined || value === attribute.value)) {+ if (attribute.type === type && attribute.name === name && (value === undefined || value === attribute.value)) {attribute.isDeleted = true;await attribute.save();diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.htmlindex 8c76aa1240..673fb043ac 100644--- a/docs/backend_api/services_backend_script_api.js.html+++ b/docs/backend_api/services_backend_script_api.js.html@@ -232,7 +232,7 @@ function BackendScriptApi(currentNote, apiParams) {this.createDataNote = async (parentNoteId, title, content = {}) => await noteService.createNewNote({parentNoteId,title,- content: JSON.stringify(content),+ content: JSON.stringify(content, null, '\t'),type: 'code',mime: 'application/json'});diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex bcb2edccbc..4197e76116 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -807,7 +807,7 @@<div class="description">- Activates newly created note. Compared to this.activateNote() also refreshes tree.+ Activates newly created note. Compared to this.activateNote() also makes sure that frontend has been fully synced.</div>diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmlindex d45ca3336a..460941ea91 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -86,13 +86,13 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte};/**- * Activates newly created note. Compared to this.activateNote() also refreshes tree.+ * Activates newly created note. Compared to this.activateNote() also makes sure that frontend has been fully synced.** @param {string} notePath (or noteId)* @return {Promise<void>}*/this.activateNewNote = async notePath => {- await treeService.reload();+ await ws.waitForMaxKnownSyncId();await treeService.activateNote(notePath, noteDetailService.focusAndSelectTitle);};diff --git a/src/public/javascripts/services/frontend_script_api.js b/src/public/javascripts/services/frontend_script_api.jsindex 06bc5e8390..a141c8f19c 100644--- a/src/public/javascripts/services/frontend_script_api.js+++ b/src/public/javascripts/services/frontend_script_api.js@@ -58,13 +58,13 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte};/**- * Activates newly created note. Compared to this.activateNote() also refreshes tree.+ * Activates newly created note. Compared to this.activateNote() also makes sure that frontend has been fully synced.** @param {string} notePath (or noteId)* @return {Promise<void>}*/this.activateNewNote = async notePath => {- await treeService.reload();+ await ws.waitForMaxKnownSyncId();await treeService.activateNote(notePath, noteDetailService.focusAndSelectTitle);};