mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 15:30:27 +03:00
Remove clean room ID and add default handler for if no active call has existed yet, but user clicks on show chat
This commit is contained in:
parent
dabe7f7849
commit
d9c0c85483
1 changed files with 2 additions and 8 deletions
|
|
@ -54,10 +54,6 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
|||
|
||||
const setupWidget = useCallback(
|
||||
(widgetApiRef, smallWidgetRef, iframeRef, skipLobby) => {
|
||||
const cleanupRoomId = smallWidgetRef.current?.roomId;
|
||||
logger.error(`PersistentCallContainer effect running. activeCallRoomId: ${activeCallRoomId}`);
|
||||
logger.error(`PersistentCallContainer effect running. viewedCallRoomId: ${viewedCallRoomId}`);
|
||||
logger.error(`PersistentCallContainer effect running. isCallActive: ${isCallActive}`);
|
||||
/**
|
||||
* TODO:
|
||||
* Need proper shutdown handling. Events from the previous widget can still come through it seems. Might need
|
||||
|
|
@ -84,12 +80,10 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
|||
if (mx?.getUserId()) {
|
||||
if (
|
||||
(activeCallRoomId !== viewedCallRoomId && isCallActive) ||
|
||||
// &&
|
||||
(activeCallRoomId && cleanupRoomId !== activeCallRoomId && !isCallActive)
|
||||
(activeCallRoomId && !isCallActive) ||
|
||||
(!activeCallRoomId && viewedCallRoomId && !isCallActive)
|
||||
) {
|
||||
logger.error('PersistentCallContainer Re-render');
|
||||
const roomIdToSet = skipLobby ? activeCallRoomId : viewedCallRoomId;
|
||||
|
||||
if (
|
||||
roomIdToSet &&
|
||||
(roomIdToSet === primarySmallWidgetRef?.current?.roomId ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue