Corrects the state for the situations where both iframes are "active" (not necessarily visible)

This commit is contained in:
Gigiaj 2025-05-23 13:22:22 -05:00
parent 03cbecc3f9
commit e220387b3f

View file

@ -142,9 +142,9 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
);
useEffect(() => {
if ((activeCallRoomId && !viewedCallRoomId) || activeCallRoomId)
if ((activeCallRoomId && !viewedCallRoomId) || (activeCallRoomId && viewedCallRoomId))
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
if ((!activeCallRoomId && viewedCallRoomId) || viewedCallRoomId)
if ((!activeCallRoomId && viewedCallRoomId) || (viewedCallRoomId && activeCallRoomId))
setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe);
}, [
setupWidget,