From 8b914270568e328390ac6a27c16da9c9aa4c3ea6 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 29 Aug 2022 15:09:30 +0100 Subject: [PATCH] Chore: Added more messages for external editing --- packages/lib/services/ExternalEditWatcher.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/lib/services/ExternalEditWatcher.ts b/packages/lib/services/ExternalEditWatcher.ts index f73cee15b..6a18e2ca4 100644 --- a/packages/lib/services/ExternalEditWatcher.ts +++ b/packages/lib/services/ExternalEditWatcher.ts @@ -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_ = {};