fix stuck typing member in member drawer

This commit is contained in:
Ajay Bura 2023-10-05 13:07:27 +05:30
parent 840e9939b0
commit abcd9fdfa2

View file

@ -181,7 +181,7 @@ export function MembersDrawer({ room }: MembersDrawerProps) {
});
const [onTop, setOnTop] = useState(true);
useAtomValue(
const typingMembers = useAtomValue(
useMemo(() => selectRoomTypingMembersAtom(room.roomId, roomIdToTypingMembersAtom), [room])
);
@ -524,7 +524,7 @@ export function MembersDrawer({ room }: MembersDrawerProps) {
</Avatar>
}
after={
member.typing && (
typingMembers.find((tm) => tm.userId === member.userId) && (
<Badge size="300" variant="Secondary" fill="Soft" radii="Pill" outlined>
<TypingIndicator size="300" />
</Badge>