mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
widgets can now listen to sync data changes
This commit is contained in:
@@ -54,6 +54,14 @@ class NoteInfoWidget {
|
||||
$type.text(note.type);
|
||||
$mime.text(note.mime);
|
||||
}
|
||||
|
||||
syncDataReceived(syncData) {
|
||||
if (syncData.find(sd => sd.entityName === 'notes' && sd.entityId === this.ctx.note.noteId)) {
|
||||
console.log("Re-rendering note info");
|
||||
|
||||
this.renderBody();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default NoteInfoWidget;
|
||||
Reference in New Issue
Block a user