fix "create note after" keyboard shortcut

This commit is contained in:
zadam
2020-03-17 12:28:02 +01:00
parent d4d54c5f01
commit 5a6066dcd1
4 changed files with 59 additions and 41 deletions

View File

@@ -558,23 +558,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
}
}
async createNoteAfterCommand() {
const node = this.getActiveNode();
const parentNoteId = node.data.parentNoteId;
const isProtected = await treeService.getParentProtectedStatus(node);
if (node.data.noteId === 'root' || node.data.noteId === hoistedNoteService.getHoistedNoteId()) {
return;
}
await noteCreateService.createNote(parentNoteId, {
target: 'after',
targetBranchId: node.data.branchId,
isProtected: isProtected,
saveSelection: true
});
}
async setExpandedToServer(branchId, isExpanded) {
utils.assertArguments(branchId);