Chore: Added more messages for external editing

pull/6790/head
Laurent Cozic 2022-08-29 15:09:30 +01:00
parent b174fcf17b
commit 8b91427056
1 changed files with 4 additions and 0 deletions

View File

@ -131,11 +131,15 @@ export default class ExternalEditWatcher {
if (!noteContent) this.logger().warn(`ExternalEditWatcher: Could not re-read note - user might have purposely deleted note content: ${id}`);
}
this.logger().debug('ExternalEditWatcher: Updating note object.');
const updatedNote = await Note.unserializeForEdit(noteContent);
updatedNote.id = id;
updatedNote.parent_id = note.parent_id;
await Note.save(updatedNote);
this.eventEmitter_.emit('noteChange', { id: updatedNote.id, note: updatedNote });
} else {
this.logger().debug('ExternalEditWatcher: Skipping this event.');
}
this.skipNextChangeEvent_ = {};