Fix local screen share not appearing in one-on-one calls

This was regressed by 9dfade68ee.
This commit is contained in:
Robin
2026-04-15 19:51:13 +02:00
parent c922936777
commit 832c5784d4

View File

@@ -1078,9 +1078,10 @@ export function createCallViewModel$(
);
const oneOnOneLayoutMedia$: Observable<OneOnOneLayoutMedia | null> =
userMedia$.pipe(
switchMap((userMedia) => {
if (userMedia.length <= 2) {
combineLatest([userMedia$, screenShares$]).pipe(
switchMap(([userMedia, screenShares]) => {
// One-on-one layout only supports 2 user media, no screen shares
if (userMedia.length <= 2 && screenShares.length === 0) {
const local = userMedia.find(
(vm): vm is WrappedUserMediaViewModel & LocalUserMediaViewModel =>
vm.type === "user" && vm.local,