From 832c5784d4d4191adc317fa4ac744f4c06f0d214 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 15 Apr 2026 19:51:13 +0200 Subject: [PATCH] Fix local screen share not appearing in one-on-one calls This was regressed by 9dfade68eed85e8a6df6c4ca1664b897fbdf1de7. --- src/state/CallViewModel/CallViewModel.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/state/CallViewModel/CallViewModel.ts b/src/state/CallViewModel/CallViewModel.ts index 711e5e7e..e0c55ee0 100644 --- a/src/state/CallViewModel/CallViewModel.ts +++ b/src/state/CallViewModel/CallViewModel.ts @@ -1078,9 +1078,10 @@ export function createCallViewModel$( ); const oneOnOneLayoutMedia$: Observable = - 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,