From c9fa586db1f0234af44f98bcd41bd6fce0742e39 Mon Sep 17 00:00:00 2001 From: Timo K Date: Wed, 20 May 2026 14:25:40 +0200 Subject: [PATCH] merge fixups --- src/components/CallFooterViewModel.test.ts | 9 +++++++-- src/room/InCallView.tsx | 11 +---------- src/state/CallViewModel/CallViewModel.ts | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/components/CallFooterViewModel.test.ts b/src/components/CallFooterViewModel.test.ts index 68dd9b07..1192269d 100644 --- a/src/components/CallFooterViewModel.test.ts +++ b/src/components/CallFooterViewModel.test.ts @@ -6,11 +6,12 @@ Please see LICENSE in the repository root for full details. */ import { describe, expect, it, vi } from "vitest"; +import { BehaviorSubject } from "rxjs"; import { testScope, mockMuteStates, mockMediaDevices } from "../utils/test"; import { constant } from "../state/Behavior"; import type { CallViewModel } from "../state/CallViewModel/CallViewModel"; -import type { Layout } from "../state/layout-types"; +import type { Alignment, Layout } from "../state/layout-types"; import type { SpotlightTileViewModel } from "../state/TileViewModel"; import type { DeviceLabel } from "../state/MediaDevices"; import { createCallFooterViewModel } from "./CallFooterViewModel"; @@ -57,7 +58,11 @@ function buildMinimalCallViewModel(layout: Layout): CallViewModel { const gridLayout: Layout = { type: "grid", grid: [], - setVisibleTiles: (): void => {}, + spotlightAlignment$: new BehaviorSubject({ + inline: "end", + block: "end", + }), + setVisibleTiles: (_: number) => {}, }; /** A PiP layout – only the `type` matters for the tests. */ diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 8b44a437..efead995 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -362,16 +362,6 @@ export const InCallView: FC = ({ [gridBounds], ); - const spotlightAlignment$ = useInitial( - () => new BehaviorSubject(defaultSpotlightAlignment), - ); - const pipAlignment$ = useInitial( - () => new BehaviorSubject(defaultPipAlignment), - const setGridMode = useCallback( - (mode: GridMode) => vm.setGridMode(mode), - [vm], - ); - useAppBarHidden(!showHeader); let header: ReactNode = null; @@ -512,6 +502,7 @@ export const InCallView: FC = ({ }; }, [gridBoundsObservable$]); + const showFooter = useBehavior(footerVm.showFooter$); const renderContent = (): JSX.Element => { if (layout.type === "pip") { return ( diff --git a/src/state/CallViewModel/CallViewModel.ts b/src/state/CallViewModel/CallViewModel.ts index ec827ad0..71975b49 100644 --- a/src/state/CallViewModel/CallViewModel.ts +++ b/src/state/CallViewModel/CallViewModel.ts @@ -39,7 +39,6 @@ import { tap, throttleTime, timer, - BehaviorSubject, } from "rxjs"; import { logger as rootLogger } from "matrix-js-sdk/lib/logger"; import { @@ -1765,6 +1764,7 @@ export function createCallViewModel$( reconnecting$: localMembership.reconnecting$, livekitRoomItems$, connected$: localMembership.connected$, + windowMode$, }; }