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> = const oneOnOneLayoutMedia$: Observable<OneOnOneLayoutMedia | null> =
userMedia$.pipe( combineLatest([userMedia$, screenShares$]).pipe(
switchMap((userMedia) => { switchMap(([userMedia, screenShares]) => {
if (userMedia.length <= 2) { // One-on-one layout only supports 2 user media, no screen shares
if (userMedia.length <= 2 && screenShares.length === 0) {
const local = userMedia.find( const local = userMedia.find(
(vm): vm is WrappedUserMediaViewModel & LocalUserMediaViewModel => (vm): vm is WrappedUserMediaViewModel & LocalUserMediaViewModel =>
vm.type === "user" && vm.local, vm.type === "user" && vm.local,