From c2f483e0a9e0aaeccc92094bb5227dc9da993d6d Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:07:24 +0530 Subject: [PATCH] show presence in member drawer --- src/app/components/presence/styles.css.ts | 2 +- src/app/features/room/MembersDrawer.tsx | 34 ++++++++++++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/app/components/presence/styles.css.ts b/src/app/components/presence/styles.css.ts index 12ea7f18..0d7e91d8 100644 --- a/src/app/components/presence/styles.css.ts +++ b/src/app/components/presence/styles.css.ts @@ -15,7 +15,7 @@ export const AvatarPresenceBadge = style({ zIndex: 1, display: 'flex', - padding: config.borderWidth.B600, + padding: '5%', backgroundColor: 'inherit', borderRadius: config.radii.Pill, overflow: 'hidden', diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx index 7a6ff8b2..d2be4e53 100644 --- a/src/app/features/room/MembersDrawer.tsx +++ b/src/app/features/room/MembersDrawer.tsx @@ -62,6 +62,8 @@ import { JoinRoomMemberObject } from '../../../client/storage/collections'; import { ClientContext } from '../../../client/context'; import { mxcToHttp } from '../../../client/mxcToHttp'; import { usePendingMembers } from '../../hooks/usePendingMembers'; +import { useUserPresence } from '../../hooks/useUserPresence'; +import { AvatarPresence, PresenceBadge } from '../../components/presence'; type MemberDrawerHeaderProps = { joinedMemberCount: number; @@ -124,6 +126,8 @@ function MemberItem({ pressed, typing, }: MemberItemProps) { + const presence = useUserPresence(member.userId); + const name = getName(member.userId); const avatarMxcUrl = getAvatar(member.userId); const avatarUrl = avatarMxcUrl @@ -143,14 +147,19 @@ function MemberItem({ radii="400" onClick={onClick} before={ - - } - /> - + } + > + + } + /> + + } after={ typing && ( @@ -160,10 +169,15 @@ function MemberItem({ ) } > - - + + {name} + {presence?.status && ( + + {presence.status} + + )} );