mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-07 07:40:29 +03:00
Fixes call initializing by default on mobile
This commit is contained in:
parent
65ff5e3943
commit
b6afe3b968
1 changed files with 11 additions and 9 deletions
|
|
@ -262,20 +262,22 @@ export function RoomNavItem({
|
|||
if (chatButton && chatButton.contains(target)) {
|
||||
return;
|
||||
}
|
||||
if (!isMobile) {
|
||||
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
|
||||
hangUp();
|
||||
setActiveCallRoomId(room.roomId);
|
||||
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||
navigateRoom(room.roomId);
|
||||
if (room.isCallRoom()) {
|
||||
if (!isMobile) {
|
||||
if (activeCallRoomId !== room.roomId) {
|
||||
hangUp();
|
||||
setActiveCallRoomId(room.roomId);
|
||||
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
evt.stopPropagation();
|
||||
if (isChatOpen) toggleChat();
|
||||
setViewedCallRoomId(room.roomId);
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
} else {
|
||||
evt.stopPropagation();
|
||||
if (isChatOpen) toggleChat();
|
||||
setViewedCallRoomId(room.roomId);
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue