mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 15:00:30 +03:00
Sets initial states so the iframes don't cause the other to fail with the npm embedded package
This commit is contained in:
parent
1871f70704
commit
9302003c30
2 changed files with 3 additions and 1 deletions
|
|
@ -266,6 +266,7 @@ export function RoomNavItem({
|
||||||
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
|
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
|
||||||
hangUp();
|
hangUp();
|
||||||
setActiveCallRoomId(room.roomId);
|
setActiveCallRoomId(room.roomId);
|
||||||
|
setViewedCallRoomId(room.roomId);
|
||||||
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||||
navigateRoom(room.roomId);
|
navigateRoom(room.roomId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,8 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
|
if ((activeCallRoomId && !viewedCallRoomId) || activeCallRoomId)
|
||||||
|
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
|
||||||
setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe);
|
setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe);
|
||||||
}, [
|
}, [
|
||||||
setupWidget,
|
setupWidget,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue