mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-08 16:20:28 +03:00
Improve call room view stability
This commit is contained in:
parent
9ae7c318ab
commit
cd233053bc
1 changed files with 22 additions and 19 deletions
|
|
@ -14,6 +14,7 @@ import { markAsRead } from '../../../client/action/notifications';
|
|||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { useRoomMembers } from '../../hooks/useRoomMembers';
|
||||
import { CallView } from './CallView';
|
||||
import { useCallState } from '../../pages/client/CallProvider';
|
||||
|
||||
export function Room() {
|
||||
const { eventId } = useParams();
|
||||
|
|
@ -22,6 +23,7 @@ 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);
|
||||
|
|
@ -50,11 +52,11 @@ export function Room() {
|
|||
}}
|
||||
>
|
||||
<CallView room={room} eventId={eventId} />
|
||||
|
||||
{(!room.isCallRoom() || isChatOpen) && (
|
||||
<Box
|
||||
grow="Yes"
|
||||
style={{
|
||||
width: room.isCallRoom() ? '50%' : '100%',
|
||||
width: room.isCallRoom() ? (isChatOpen ? '40%' : '0%') : '100%',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
|
|
@ -70,6 +72,7 @@ export function Room() {
|
|||
</>
|
||||
)}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
</PowerLevelsContextProvider>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue