mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-03 06:55:44 +00:00
Improve typing around event emitter handlers (#7816)
This commit is contained in:
committed by
GitHub
parent
213b32bf14
commit
7fa01ffb06
@@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
import { EventSubscription } from 'fbemitter';
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||
|
||||
import defaultDispatcher from '../../dispatcher/dispatcher';
|
||||
import { pendingVerificationRequestForUser } from '../../verification';
|
||||
@@ -26,9 +27,9 @@ import { SettingLevel } from "../../settings/SettingLevel";
|
||||
import { UPDATE_EVENT } from '../AsyncStore';
|
||||
import { ReadyWatchingStore } from '../ReadyWatchingStore';
|
||||
import {
|
||||
IRightPanelCard,
|
||||
convertToStatePanel,
|
||||
convertToStorePanel,
|
||||
IRightPanelCard,
|
||||
IRightPanelForRoom,
|
||||
} from './RightPanelStoreIPanelState';
|
||||
import RoomViewStore from '../RoomViewStore';
|
||||
@@ -70,7 +71,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
protected async onReady(): Promise<any> {
|
||||
this.isReady = true;
|
||||
this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate);
|
||||
this.matrixClient.on("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.matrixClient.on(CryptoEvent.VerificationRequest, this.onVerificationRequestUpdate);
|
||||
this.viewedRoomId = RoomViewStore.getRoomId();
|
||||
this.loadCacheFromSettings();
|
||||
this.emitAndUpdateSettings();
|
||||
@@ -84,7 +85,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
|
||||
protected async onNotReady(): Promise<any> {
|
||||
this.isReady = false;
|
||||
this.matrixClient.off("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.matrixClient.off(CryptoEvent.VerificationRequest, this.onVerificationRequestUpdate);
|
||||
this.roomStoreToken.remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user