Simplify event name as it's the only one
This commit is contained in:
parent
3f20eb9610
commit
b6f854abe4
3 changed files with 6 additions and 6 deletions
|
@ -91,13 +91,13 @@ class WidgetEchoStore extends EventEmitter {
|
|||
if (this._roomWidgetEcho[roomId] === undefined) this._roomWidgetEcho[roomId] = {};
|
||||
|
||||
this._roomWidgetEcho[roomId][widgetId] = state;
|
||||
this.emit('updateRoomWidgetEcho');
|
||||
this.emit('update');
|
||||
}
|
||||
|
||||
removeRoomWidgetEcho(roomId, widgetId) {
|
||||
delete this._roomWidgetEcho[roomId][widgetId];
|
||||
if (Object.keys(this._roomWidgetEcho[roomId]).length === 0) delete this._roomWidgetEcho[roomId];
|
||||
this.emit('updateRoomWidgetEcho');
|
||||
this.emit('update');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue