trigger events after note attributes are created

This commit is contained in:
azivner
2018-10-08 11:09:45 +02:00
parent 24673168bb
commit be94766f76
2 changed files with 4 additions and 3 deletions

View File

@@ -68,9 +68,6 @@ async function createNewNote(parentNoteId, noteData) {
isExpanded: 0
}).save();
await triggerNoteTitleChanged(note);
await triggerChildNoteCreated(note, parentNote);
for (const attr of await parentNote.getAttributes()) {
if (attr.name.startsWith("child:")) {
await new Attribute({
@@ -86,6 +83,9 @@ async function createNewNote(parentNoteId, noteData) {
}
}
await triggerNoteTitleChanged(note);
await triggerChildNoteCreated(note, parentNote);
return {
note,
branch