convert CallViewModel into create function pattern. (with much more

minimal changes thanks to the intermediate class refactor)
This commit is contained in:
Timo K
2025-11-17 18:22:25 +01:00
parent 16e1c59e11
commit 2e2c799f72
5 changed files with 1115 additions and 1123 deletions

View File

@@ -59,7 +59,8 @@ import { type MatrixInfo } from "./VideoPreview";
import { InviteButton } from "../button/InviteButton";
import { LayoutToggle } from "./LayoutToggle";
import {
CallViewModel,
type CallViewModel,
createCallViewModel$,
type GridMode,
} from "../state/CallViewModel/CallViewModel.ts";
import { Grid, type TileProps } from "../grid/Grid";
@@ -128,7 +129,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
const reactionsReader = new ReactionsReader(scope, props.rtcSession);
const { autoLeaveWhenOthersLeft, waitForCallPickup, sendNotificationType } =
urlParams;
const vm = new CallViewModel(
const vm = createCallViewModel$(
scope,
props.rtcSession,
props.matrixRoom,