mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 15:30:27 +03:00
add check to prevent DCing from the call you're currently in...
This commit is contained in:
parent
79647c5b50
commit
3dcfde4461
1 changed files with 2 additions and 2 deletions
|
|
@ -221,7 +221,7 @@ export function RoomNavItem({
|
||||||
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setHover });
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setHover });
|
||||||
const [menuAnchor, setMenuAnchor] = useState<RectCords>();
|
const [menuAnchor, setMenuAnchor] = useState<RectCords>();
|
||||||
const unread = useRoomUnread(room.roomId, roomToUnreadAtom);
|
const unread = useRoomUnread(room.roomId, roomToUnreadAtom);
|
||||||
const { isChatOpen, toggleChat, hangUp } = useCallState();
|
const { activeCallRoomId, isChatOpen, toggleChat, hangUp } = useCallState();
|
||||||
const typingMember = useRoomTypingMember(room.roomId).filter(
|
const typingMember = useRoomTypingMember(room.roomId).filter(
|
||||||
(receipt) => receipt.userId !== mx.getUserId()
|
(receipt) => receipt.userId !== mx.getUserId()
|
||||||
);
|
);
|
||||||
|
|
@ -249,7 +249,7 @@ export function RoomNavItem({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room.isCallRoom()) {
|
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
|
||||||
hangUp();
|
hangUp();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue