Separate out SDKContext (#34053)

* Separate out SDKContext

...from SDKContextClass, as the comments hopefully explain.

Also make the captitalisation consistent.

* Adding the new file usually helps too

* Fix import

* More comment

* Update the various imports of SDKContextClass

* Also fix case of TestSDKContext

* Update the mock
This commit is contained in:
David Baker
2026-07-01 12:49:18 +00:00
committed by GitHub
parent 1c1bda9cab
commit 54d27fd59c
89 changed files with 493 additions and 458 deletions
@@ -118,7 +118,8 @@ import RightPanelStore from "../../stores/right-panel/RightPanelStore";
import { TimelineRenderingType } from "../../contexts/RoomContext";
import { type ValidatedServerConfig } from "../../utils/ValidatedServerConfig";
import { isLocalRoom } from "../../utils/localRoom/isLocalRoom";
import { SDKContext, SdkContextClass } from "../../contexts/SDKContext";
import { SDKContext } from "../../contexts/SDKContext";
import { SDKContextClass } from "../../contexts/SDKContextClass.ts";
import { viewUserDeviceSettings } from "../../actions/handlers/viewUserDeviceSettings";
import GenericToast from "../views/toasts/GenericToast";
import RovingSpotlightDialog from "../views/dialogs/spotlight/SpotlightDialog";
@@ -240,14 +241,14 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
private dispatcherRef?: string;
private themeWatcher?: ThemeWatcher;
private fontWatcher?: FontWatcher;
private readonly stores: SdkContextClass;
private readonly stores: SDKContextClass;
private loadSessionAbortController = new AbortController();
private sessionLoadStarted = false;
public constructor(props: IProps) {
super(props);
this.stores = SdkContextClass.instance;
this.stores = SDKContextClass.instance;
this.stores.constructEagerStores();
this.state = {