From fb9ca31a43ba2e99d10cc86d767bfea16755d989 Mon Sep 17 00:00:00 2001 From: Gimle Larpes <97182804+GimleLarpes@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:36:16 +0200 Subject: [PATCH] Update Room.tsx to accomodate restructuring of Room, RoomView and CallView --- src/app/features/room/Room.tsx | 58 +++++++++------------------------- 1 file changed, 15 insertions(+), 43 deletions(-) diff --git a/src/app/features/room/Room.tsx b/src/app/features/room/Room.tsx index 24f378b4..e4ecaae7 100644 --- a/src/app/features/room/Room.tsx +++ b/src/app/features/room/Room.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-nested-ternary */ import React, { useCallback } from 'react'; import { Box, Line } from 'folds'; import { useParams } from 'react-router-dom'; @@ -15,7 +14,6 @@ import { markAsRead } from '../../../client/action/notifications'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useRoomMembers } from '../../hooks/useRoomMembers'; import { CallView } from '../call/CallView'; -import { useCallState } from '../../pages/client/call/CallProvider'; import { RoomViewHeader } from './RoomViewHeader'; export function Room() { @@ -25,7 +23,6 @@ export function Room() { const [isDrawer] = useSetting(settingsAtom, 'isPeopleDrawer'); const [hideActivity] = useSetting(settingsAtom, 'hideActivity'); - const { isChatOpen } = useCallState(); const screenSize = useScreenSizeContext(); const powerLevels = usePowerLevels(room); const members = useRoomMembers(mx, room?.roomId); @@ -44,48 +41,23 @@ export function Room() { return ( - - {room.isCallRoom() && } - - - {(!room.isCallRoom() || isChatOpen) && ( - - - - - - )} - {screenSize === ScreenSize.Desktop && !room.isCallRoom() && isDrawer && ( - <> + + + + + + {room.isCallRoom() && screenSize === ScreenSize.Desktop && ( - - - )} + )} + + + {!room.isCallRoom() && screenSize === ScreenSize.Desktop && isDrawer && ( + <> + + + + )} );