it should not be possible to add note after hoisted note

This commit is contained in:
azivner
2019-01-02 18:59:08 +01:00
parent ecdc5865a6
commit c85979b66b
3 changed files with 10 additions and 9 deletions

View File

@@ -649,11 +649,15 @@ messagingService.subscribeToSyncMessages(syncData => {
}
});
utils.bindShortcut('ctrl+o', () => {
utils.bindShortcut('ctrl+o', async () => {
const node = getCurrentNode();
const parentNoteId = node.data.parentNoteId;
const isProtected = treeUtils.getParentProtectedStatus(node);
if (node.data.noteId === 'root' || node.data.noteId === await hoistedNoteService.getHoistedNoteId()) {
return;
}
createNote(node, parentNoteId, 'after', isProtected, true);
});