Use context provided RoomViewStore within the RoomView component hierarchy (#31077)
* Update ContentMessages.ts Update ContentMessages.ts * update PlaybackQueue.ts * Update SpaceHierarchy.tsx * Update ThreadView.tsx * Update RoomCallBanner.tsx * Update useRoomCall.tsx * Update DateSeparator.tsx * Update TimelineCard.tsx * Update UserInfoBasicOptions * Update slask-commands/utils.ts * lint * Update PlaybackQueue, MVoiceMessageBody and UserInfoBasicOptionsView tests. * Update RoomHeader-test.tsx * lint * Add ts docs * Update utils-test.tsx * Update message-test.ts * coverage * lint * Improve naming --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
co-authored by
Michael Telatynski
parent
209dfece21
commit
ae2acdf311
@@ -12,6 +12,7 @@ import { PlaybackQueue } from "../../../src/audio/PlaybackQueue";
|
||||
import { type Playback, PlaybackState } from "../../../src/audio/Playback";
|
||||
import { UPDATE_EVENT } from "../../../src/stores/AsyncStore";
|
||||
import { MockedPlayback } from "./MockedPlayback";
|
||||
import { SdkContextClass } from "../../../src/contexts/SDKContext";
|
||||
|
||||
describe("PlaybackQueue", () => {
|
||||
let playbackQueue: PlaybackQueue;
|
||||
@@ -21,7 +22,7 @@ describe("PlaybackQueue", () => {
|
||||
mockRoom = {
|
||||
getMember: jest.fn(),
|
||||
} as unknown as Mocked<Room>;
|
||||
playbackQueue = new PlaybackQueue(mockRoom);
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SdkContextClass.instance.roomViewStore);
|
||||
});
|
||||
|
||||
it.each([
|
||||
@@ -75,7 +76,7 @@ describe("PlaybackQueue", () => {
|
||||
`mx_voice_message_clocks_${mockRoom.roomId}`,
|
||||
JSON.stringify(Array.from(clockStates.entries())),
|
||||
);
|
||||
playbackQueue = new PlaybackQueue(mockRoom);
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SdkContextClass.instance.roomViewStore);
|
||||
|
||||
// @ts-ignore
|
||||
expect(playbackQueue.clockStates.has("a")).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user