mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-15 18:49:21 +00:00
merge fixups
This commit is contained in:
@@ -6,11 +6,12 @@ Please see LICENSE in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
|
import { BehaviorSubject } from "rxjs";
|
||||||
|
|
||||||
import { testScope, mockMuteStates, mockMediaDevices } from "../utils/test";
|
import { testScope, mockMuteStates, mockMediaDevices } from "../utils/test";
|
||||||
import { constant } from "../state/Behavior";
|
import { constant } from "../state/Behavior";
|
||||||
import type { CallViewModel } from "../state/CallViewModel/CallViewModel";
|
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 { SpotlightTileViewModel } from "../state/TileViewModel";
|
||||||
import type { DeviceLabel } from "../state/MediaDevices";
|
import type { DeviceLabel } from "../state/MediaDevices";
|
||||||
import { createCallFooterViewModel } from "./CallFooterViewModel";
|
import { createCallFooterViewModel } from "./CallFooterViewModel";
|
||||||
@@ -57,7 +58,11 @@ function buildMinimalCallViewModel(layout: Layout): CallViewModel {
|
|||||||
const gridLayout: Layout = {
|
const gridLayout: Layout = {
|
||||||
type: "grid",
|
type: "grid",
|
||||||
grid: [],
|
grid: [],
|
||||||
setVisibleTiles: (): void => {},
|
spotlightAlignment$: new BehaviorSubject<Alignment>({
|
||||||
|
inline: "end",
|
||||||
|
block: "end",
|
||||||
|
}),
|
||||||
|
setVisibleTiles: (_: number) => {},
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A PiP layout – only the `type` matters for the tests. */
|
/** A PiP layout – only the `type` matters for the tests. */
|
||||||
|
|||||||
@@ -362,16 +362,6 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
[gridBounds],
|
[gridBounds],
|
||||||
);
|
);
|
||||||
|
|
||||||
const spotlightAlignment$ = useInitial(
|
|
||||||
() => new BehaviorSubject(defaultSpotlightAlignment),
|
|
||||||
);
|
|
||||||
const pipAlignment$ = useInitial(
|
|
||||||
() => new BehaviorSubject(defaultPipAlignment),
|
|
||||||
const setGridMode = useCallback(
|
|
||||||
(mode: GridMode) => vm.setGridMode(mode),
|
|
||||||
[vm],
|
|
||||||
);
|
|
||||||
|
|
||||||
useAppBarHidden(!showHeader);
|
useAppBarHidden(!showHeader);
|
||||||
|
|
||||||
let header: ReactNode = null;
|
let header: ReactNode = null;
|
||||||
@@ -512,6 +502,7 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
};
|
};
|
||||||
}, [gridBoundsObservable$]);
|
}, [gridBoundsObservable$]);
|
||||||
|
|
||||||
|
const showFooter = useBehavior(footerVm.showFooter$);
|
||||||
const renderContent = (): JSX.Element => {
|
const renderContent = (): JSX.Element => {
|
||||||
if (layout.type === "pip") {
|
if (layout.type === "pip") {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import {
|
|||||||
tap,
|
tap,
|
||||||
throttleTime,
|
throttleTime,
|
||||||
timer,
|
timer,
|
||||||
BehaviorSubject,
|
|
||||||
} from "rxjs";
|
} from "rxjs";
|
||||||
import { logger as rootLogger } from "matrix-js-sdk/lib/logger";
|
import { logger as rootLogger } from "matrix-js-sdk/lib/logger";
|
||||||
import {
|
import {
|
||||||
@@ -1765,6 +1764,7 @@ export function createCallViewModel$(
|
|||||||
reconnecting$: localMembership.reconnecting$,
|
reconnecting$: localMembership.reconnecting$,
|
||||||
livekitRoomItems$,
|
livekitRoomItems$,
|
||||||
connected$: localMembership.connected$,
|
connected$: localMembership.connected$,
|
||||||
|
windowMode$,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user