Load room member even when member drawer is closed (#1825)

This commit is contained in:
Ajay Bura 2024-07-23 10:45:17 +05:30 committed by GitHub
parent e6d6b0349e
commit a32c8bf228
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View file

@ -12,6 +12,7 @@ import { useRoom } from '../../hooks/useRoom';
import { useKeyDown } from '../../hooks/useKeyDown';
import { markAsRead } from '../../../client/action/notifications';
import { useMatrixClient } from '../../hooks/useMatrixClient';
import { useRoomMembers } from '../../hooks/useRoomMembers';
export function Room() {
const { eventId } = useParams();
@ -21,6 +22,7 @@ export function Room() {
const [isDrawer] = useSetting(settingsAtom, 'isPeopleDrawer');
const screenSize = useScreenSizeContext();
const powerLevels = usePowerLevels(room);
const members = useRoomMembers(mx, room.roomId);
useKeyDown(
window,
@ -30,7 +32,7 @@ export function Room() {
markAsRead(mx, room.roomId);
}
},
[room.roomId]
[mx, room.roomId]
)
);
@ -41,7 +43,7 @@ export function Room() {
{screenSize === ScreenSize.Desktop && isDrawer && (
<>
<Line variant="Background" direction="Vertical" size="300" />
<MembersDrawer key={room.roomId} room={room} />
<MembersDrawer key={room.roomId} room={room} members={members} />
</>
)}
</Box>