This commit is contained in:
zadam
2020-01-28 21:54:28 +01:00
parent 9301679707
commit 368d3b1b97
15 changed files with 76 additions and 96 deletions

View File

@@ -427,16 +427,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
}
}
async notesReloadedListener({ noteIds, activateNotePath }) {
if (!activateNotePath) {
const activeNode = this.getActiveNode();
async notesReloadedListener({loadResults}) {
const activeNode = this.getActiveNode();
const activateNotePath = activeNode ? await treeService.getNotePath(activeNode) : null;
if (activeNode) {
activateNotePath = await treeService.getNotePath(activeNode);
}
}
for (const noteId of noteIds) {
for (const noteId of loadResults.getNoteIds()) {
for (const node of this.getNodesByNoteId(noteId)) {
const branch = treeCache.getBranch(node.data.branchId, true);
@@ -460,12 +455,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
}
}
noteTitleChangedListener({noteId}) {
for (const node of this.getNodesByNoteId(noteId)) {
treeService.setNodeTitleWithPrefix(node);
}
}
async createNoteAfterListener() {
const node = this.getActiveNode();
const parentNoteId = node.data.parentNoteId;