mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Fix WidgetStore handler bindings
This commit is contained in:
parent
0e58eb6d56
commit
04d2f93902
1 changed files with 4 additions and 4 deletions
|
@ -103,11 +103,11 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onWidgetEchoStoreUpdate(roomId: string, widgetId: string) {
|
private onWidgetEchoStoreUpdate = (roomId: string, widgetId: string) => {
|
||||||
this.initRoom(roomId);
|
this.initRoom(roomId);
|
||||||
this.loadRoomWidgets(this.matrixClient.getRoom(roomId));
|
this.loadRoomWidgets(this.matrixClient.getRoom(roomId));
|
||||||
this.emit(UPDATE_EVENT);
|
this.emit(UPDATE_EVENT);
|
||||||
}
|
};
|
||||||
|
|
||||||
private generateApps(room: Room): IApp[] {
|
private generateApps(room: Room): IApp[] {
|
||||||
return WidgetEchoStore.getEchoedRoomWidgets(room.roomId, WidgetUtils.getRoomWidgets(room)).map((ev) => {
|
return WidgetEchoStore.getEchoedRoomWidgets(room.roomId, WidgetUtils.getRoomWidgets(room)).map((ev) => {
|
||||||
|
@ -127,13 +127,13 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||||
this.emit(room.roomId);
|
this.emit(room.roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onRoomStateEvents(ev: MatrixEvent) {
|
private onRoomStateEvents = (ev: MatrixEvent) => {
|
||||||
if (ev.getType() !== "im.vector.modular.widgets") return;
|
if (ev.getType() !== "im.vector.modular.widgets") return;
|
||||||
const roomId = ev.getRoomId();
|
const roomId = ev.getRoomId();
|
||||||
this.initRoom(roomId);
|
this.initRoom(roomId);
|
||||||
this.loadRoomWidgets(this.matrixClient.getRoom(roomId));
|
this.loadRoomWidgets(this.matrixClient.getRoom(roomId));
|
||||||
this.emit(UPDATE_EVENT);
|
this.emit(UPDATE_EVENT);
|
||||||
}
|
};
|
||||||
|
|
||||||
public getRoomId = (widgetId: string) => {
|
public getRoomId = (widgetId: string) => {
|
||||||
const app = this.widgetMap.get(widgetId);
|
const app = this.widgetMap.get(widgetId);
|
||||||
|
|
Loading…
Reference in a new issue