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:
@@ -14,7 +14,7 @@ import { MainSplitContentType } from "../../src/contexts/RoomContext";
|
||||
import { type RoomContextType, TimelineRenderingType } from "../../src/contexts/RoomContext";
|
||||
import { Layout } from "../../src/settings/enums/Layout";
|
||||
import { mkEvent } from "./test-utils";
|
||||
import { SdkContextClass } from "../../src/contexts/SDKContext";
|
||||
import { SDKContextClass } from "../../src/contexts/SDKContextClass";
|
||||
|
||||
export const makeMembershipEvent = (roomId: string, userId: string, membership = KnownMembership.Join) =>
|
||||
mkEvent({
|
||||
@@ -45,7 +45,7 @@ export const makeRoomWithStateEvents = (
|
||||
|
||||
export function getRoomContext(room: Room, override: Partial<RoomContextType>): RoomContextType {
|
||||
return {
|
||||
roomViewStore: SdkContextClass.instance.roomViewStore,
|
||||
roomViewStore: SDKContextClass.instance.roomViewStore,
|
||||
room,
|
||||
roomLoading: true,
|
||||
peekLoading: false,
|
||||
|
||||
Reference in New Issue
Block a user