fix event

This commit is contained in:
zadam 2023-06-01 00:13:08 +02:00
parent ae42e0efc7
commit 758dba9ba5

View File

@ -12,6 +12,7 @@ const TaskContext = require("../../services/task_context");
const dayjs = require("dayjs"); const dayjs = require("dayjs");
const utc = require('dayjs/plugin/utc'); const utc = require('dayjs/plugin/utc');
const eventService = require("../../services/events"); const eventService = require("../../services/events");
const cls = require("../../services/cls.js");
dayjs.extend(utc); dayjs.extend(utc);
const LABEL = 'label'; const LABEL = 'label';
@ -316,11 +317,13 @@ class BNote extends AbstractBeccaEntity {
isSynced: true isSynced: true
}); });
if (!cls.isEntityEventsDisabled()) {
eventService.emit(eventService.ENTITY_CHANGED, { eventService.emit(eventService.ENTITY_CHANGED, {
entityName: 'note_contents', entityName: 'note_contents',
entity: this entity: this
}); });
} }
}
setJsonContent(content) { setJsonContent(content) {
this.setContent(JSON.stringify(content, null, '\t')); this.setContent(JSON.stringify(content, null, '\t'));