Stores refactor: convert TypingStore; rename TestStores to TestSdkContext (#9454)

This commit is contained in:
kegsay 2022-10-19 14:14:14 +01:00 committed by GitHub
parent bb0c175b7e
commit 13fbd096b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 22 deletions

View file

@ -25,6 +25,7 @@ import { RoomNotificationStateStore } from "../stores/notifications/RoomNotifica
import RightPanelStore from "../stores/right-panel/RightPanelStore";
import { RoomViewStore } from "../stores/RoomViewStore";
import SpaceStore, { SpaceStoreClass } from "../stores/spaces/SpaceStore";
import TypingStore from "../stores/TypingStore";
import { WidgetLayoutStore } from "../stores/widgets/WidgetLayoutStore";
import WidgetStore from "../stores/WidgetStore";
@ -59,6 +60,7 @@ export class SdkContextClass {
protected _SlidingSyncManager?: SlidingSyncManager;
protected _SpaceStore?: SpaceStoreClass;
protected _LegacyCallHandler?: LegacyCallHandler;
protected _TypingStore?: TypingStore;
/**
* Automatically construct stores which need to be created eagerly so they can register with
@ -124,4 +126,11 @@ export class SdkContextClass {
}
return this._SpaceStore;
}
public get typingStore(): TypingStore {
if (!this._TypingStore) {
this._TypingStore = new TypingStore(this);
window.mxTypingStore = this._TypingStore;
}
return this._TypingStore;
}
}