mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
exposing tree cache methods to reload note's parents/children to frontend API
This commit is contained in:
@@ -375,8 +375,6 @@ async function treeInitialized() {
|
||||
// this is weird but it looks like even though init event has been called, but we the tree still
|
||||
// can't find nodes for given path which causes double loading of data. Little timeout fixes this.
|
||||
setTimeout(async () => {
|
||||
console.log("activating ", startNotePath);
|
||||
|
||||
const node = await activateNote(startNotePath);
|
||||
|
||||
// looks like this this doesn't work when triggered immediatelly after activating node
|
||||
@@ -761,7 +759,7 @@ async function checkFolderStatus(node) {
|
||||
}
|
||||
|
||||
async function reloadNote(noteId) {
|
||||
await treeCache.reload(noteId);
|
||||
await treeCache.reloadChildren(noteId);
|
||||
|
||||
for (const node of getNodesByNoteId(noteId)) {
|
||||
await node.load(true);
|
||||
|
||||
Reference in New Issue
Block a user