Remove viewed room setting here and pass the room to hang up (seems state doesn't update fast enough otherwise)

This commit is contained in:
Gigiaj 2025-05-25 16:30:23 -05:00
parent 7d26601bfc
commit 99576a2432

View file

@ -268,10 +268,9 @@ export function RoomNavItem({
if (room.isCallRoom()) {
if (!isMobile) {
if (activeCallRoomId !== room.roomId) {
hangUp();
if (viewedCallRoomId === activeCallRoomId) setViewedCallRoomId(room.roomId);
setActiveCallRoomId(room.roomId);
navigateRoom(room.roomId);
hangUp(room.roomId);
setActiveCallRoomId(room.roomId);
} else {
navigateRoom(room.roomId);
}