mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 15:00:30 +03:00
Re-add intended switching behavior
This commit is contained in:
parent
1a821961f3
commit
bf131f76dc
1 changed files with 4 additions and 1 deletions
|
|
@ -236,6 +236,7 @@ export function RoomNavItem({
|
||||||
(receipt) => receipt.userId !== mx.getUserId()
|
(receipt) => receipt.userId !== mx.getUserId()
|
||||||
);
|
);
|
||||||
const { navigateRoom } = useRoomNavigate();
|
const { navigateRoom } = useRoomNavigate();
|
||||||
|
const { roomIdOrAlias: viewedRoomId } = useParams();
|
||||||
const screenSize = useScreenSizeContext();
|
const screenSize = useScreenSizeContext();
|
||||||
const isMobile = screenSize === ScreenSize.Mobile;
|
const isMobile = screenSize === ScreenSize.Mobile;
|
||||||
|
|
||||||
|
|
@ -264,7 +265,9 @@ export function RoomNavItem({
|
||||||
if (room.isCallRoom()) {
|
if (room.isCallRoom()) {
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
if (activeCallRoomId !== room.roomId) {
|
if (activeCallRoomId !== room.roomId) {
|
||||||
navigateRoom(room.roomId);
|
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||||
|
navigateRoom(room.roomId);
|
||||||
|
}
|
||||||
hangUp(room.roomId);
|
hangUp(room.roomId);
|
||||||
setActiveCallRoomId(room.roomId);
|
setActiveCallRoomId(room.roomId);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue