Step 8.3: Convert RoomViewStore
to a more modern singleton for imports
This commit is contained in:
parent
8d2dba4102
commit
d5ed1eb66e
24 changed files with 99 additions and 102 deletions
|
@ -25,7 +25,7 @@ import { MatrixClientPeg } from "../MatrixClientPeg";
|
|||
import { arrayFastClone } from "../utils/arrays";
|
||||
import { PlaybackManager } from "./PlaybackManager";
|
||||
import { isVoiceMessage } from "../utils/EventUtils";
|
||||
import RoomViewStore from "../stores/RoomViewStore";
|
||||
import { RoomViewStore } from "../stores/RoomViewStore";
|
||||
|
||||
/**
|
||||
* Audio playback queue management for a given room. This keeps track of where the user
|
||||
|
@ -51,8 +51,8 @@ export class PlaybackQueue {
|
|||
constructor(private room: Room) {
|
||||
this.loadClocks();
|
||||
|
||||
RoomViewStore.addListener(() => {
|
||||
if (RoomViewStore.getRoomId() === this.room.roomId) {
|
||||
RoomViewStore.instance.addListener(() => {
|
||||
if (RoomViewStore.instance.getRoomId() === this.room.roomId) {
|
||||
// Reset the state of the playbacks before they start mounting and enqueuing updates.
|
||||
// We reset the entirety of the queue, including order, to ensure the user isn't left
|
||||
// confused with what order the messages are playing in.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue