From b75e2aa299469aa43244e02d72329209a2dce866 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 7 Sep 2020 16:13:05 +0100 Subject: [PATCH] WidgetEchoStore improve update event to include roomId and widgetId --- src/stores/WidgetEchoStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/WidgetEchoStore.js b/src/stores/WidgetEchoStore.js index a5e7b12da0..7dd093d45e 100644 --- a/src/stores/WidgetEchoStore.js +++ b/src/stores/WidgetEchoStore.js @@ -93,13 +93,13 @@ class WidgetEchoStore extends EventEmitter { if (this._roomWidgetEcho[roomId] === undefined) this._roomWidgetEcho[roomId] = {}; this._roomWidgetEcho[roomId][widgetId] = state; - this.emit('update'); + this.emit('update', roomId, widgetId); } removeRoomWidgetEcho(roomId, widgetId) { delete this._roomWidgetEcho[roomId][widgetId]; if (Object.keys(this._roomWidgetEcho[roomId]).length === 0) delete this._roomWidgetEcho[roomId]; - this.emit('update'); + this.emit('update', roomId, widgetId); } }