mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
all access to notes and branches is now async so we can lazy load it in the future
This commit is contained in:
@@ -25,7 +25,8 @@ class TreeCache {
|
||||
}
|
||||
}
|
||||
|
||||
getNote(noteId) {
|
||||
/** @return NoteShort */
|
||||
async getNote(noteId) {
|
||||
return this.notes[noteId];
|
||||
}
|
||||
|
||||
@@ -47,11 +48,13 @@ class TreeCache {
|
||||
this.addBranch(branch);
|
||||
}
|
||||
|
||||
getBranch(branchId) {
|
||||
/** @return Branch */
|
||||
async getBranch(branchId) {
|
||||
return this.branches[branchId];
|
||||
}
|
||||
|
||||
getBranchByChildParent(childNoteId, parentNoteId) {
|
||||
/** @return Branch */
|
||||
async getBranchByChildParent(childNoteId, parentNoteId) {
|
||||
const key = (childNoteId + '-' + parentNoteId);
|
||||
const branch = this.childParentToBranch[key];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user