mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 21:29:01 +00:00
Tear down AppTile using lifecycle tracking (#7833)
This commit is contained in:
@@ -31,7 +31,6 @@ import {
|
||||
convertToStorePanel,
|
||||
IRightPanelForRoom,
|
||||
} from './RightPanelStoreIPanelState';
|
||||
import { MatrixClientPeg } from "../../MatrixClientPeg";
|
||||
import RoomViewStore from '../RoomViewStore';
|
||||
|
||||
const GROUP_PHASES = [
|
||||
@@ -71,7 +70,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
protected async onReady(): Promise<any> {
|
||||
this.isReady = true;
|
||||
this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate);
|
||||
MatrixClientPeg.get().on("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.matrixClient.on("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.viewedRoomId = RoomViewStore.getRoomId();
|
||||
this.loadCacheFromSettings();
|
||||
this.emitAndUpdateSettings();
|
||||
@@ -85,7 +84,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
|
||||
protected async onNotReady(): Promise<any> {
|
||||
this.isReady = false;
|
||||
MatrixClientPeg.get().off("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.matrixClient.off("crypto.verification.request", this.onVerificationRequestUpdate);
|
||||
this.roomStoreToken.remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user