Fixes call initializing by default on mobile

This commit is contained in:
Gigiaj 2025-05-23 12:04:06 -05:00
parent 65ff5e3943
commit b6afe3b968

View file

@ -262,15 +262,14 @@ export function RoomNavItem({
if (chatButton && chatButton.contains(target)) {
return;
}
if (room.isCallRoom()) {
if (!isMobile) {
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
if (activeCallRoomId !== room.roomId) {
hangUp();
setActiveCallRoomId(room.roomId);
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
navigateRoom(room.roomId);
}
} else {
navigateRoom(room.roomId);
}
} else {
evt.stopPropagation();
@ -278,6 +277,9 @@ export function RoomNavItem({
setViewedCallRoomId(room.roomId);
navigateRoom(room.roomId);
}
} else {
navigateRoom(room.roomId);
}
};
const handleChatButtonClick = (evt: MouseEvent<HTMLButtonElement>) => {