mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
simplification of tree cache
This commit is contained in:
@@ -670,10 +670,8 @@ async function createNote(node, parentNoteId, target, extraOptions = {}) {
|
||||
|
||||
noteDetailService.addDetailLoadedListener(note.noteId, noteDetailService.focusAndSelectTitle);
|
||||
|
||||
const noteEntity = new NoteShort(treeCache, note);
|
||||
const branchEntity = new Branch(treeCache, branch);
|
||||
|
||||
treeCache.add(noteEntity, branchEntity);
|
||||
const noteEntity = await treeCache.getNote(note.noteId);
|
||||
const branchEntity = await treeCache.getBranch(branch.branchId);
|
||||
|
||||
let newNode = {
|
||||
title: newNoteName,
|
||||
@@ -836,7 +834,7 @@ async function reloadNotes(noteIds) {
|
||||
|
||||
console.debug("Reloading notes", noteIds);
|
||||
|
||||
await treeCache.reloadNotesAndTheirChildren(noteIds);
|
||||
await treeCache.reloadNotes(noteIds);
|
||||
|
||||
const activeNotePath = noteDetailService.getActiveTabNotePath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user