From 04d2f93902ceb674306be10386b01313faebc005 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 9 Sep 2020 13:15:19 +0100 Subject: [PATCH] Fix WidgetStore handler bindings --- src/stores/WidgetStore.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index c01d77855c..377512223a 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -103,11 +103,11 @@ export default class WidgetStore extends AsyncStoreWithClient { return; } - private onWidgetEchoStoreUpdate(roomId: string, widgetId: string) { + private onWidgetEchoStoreUpdate = (roomId: string, widgetId: string) => { this.initRoom(roomId); this.loadRoomWidgets(this.matrixClient.getRoom(roomId)); this.emit(UPDATE_EVENT); - } + }; private generateApps(room: Room): IApp[] { return WidgetEchoStore.getEchoedRoomWidgets(room.roomId, WidgetUtils.getRoomWidgets(room)).map((ev) => { @@ -127,13 +127,13 @@ export default class WidgetStore extends AsyncStoreWithClient { this.emit(room.roomId); } - private onRoomStateEvents(ev: MatrixEvent) { + private onRoomStateEvents = (ev: MatrixEvent) => { if (ev.getType() !== "im.vector.modular.widgets") return; const roomId = ev.getRoomId(); this.initRoom(roomId); this.loadRoomWidgets(this.matrixClient.getRoom(roomId)); this.emit(UPDATE_EVENT); - } + }; public getRoomId = (widgetId: string) => { const app = this.widgetMap.get(widgetId);