mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 15:30:27 +03:00
Remove repetitive check
This commit is contained in:
parent
8b22573e43
commit
3818671446
1 changed files with 5 additions and 3 deletions
|
|
@ -226,8 +226,11 @@ export function RoomNavItem({
|
|||
const unread = useRoomUnread(room.roomId, roomToUnreadAtom);
|
||||
const {
|
||||
activeCallRoomId,
|
||||
viewedCallRoomId,
|
||||
setActiveCallRoomId,
|
||||
setViewedCallRoomId,
|
||||
registerViewedClientWidgetApi,
|
||||
viewedClientWidgetApi,
|
||||
isChatOpen,
|
||||
toggleChat,
|
||||
hangUp,
|
||||
|
|
@ -266,10 +269,9 @@ export function RoomNavItem({
|
|||
if (!isMobile) {
|
||||
if (activeCallRoomId !== room.roomId) {
|
||||
hangUp();
|
||||
if (viewedCallRoomId === activeCallRoomId) setViewedCallRoomId(room.roomId);
|
||||
setActiveCallRoomId(room.roomId);
|
||||
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
navigateRoom(room.roomId);
|
||||
} else {
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue