diff --git a/src/app/features/room/message/thread-selector/ThreadSelector.tsx b/src/app/features/room/message/thread-selector/ThreadSelector.tsx index 3701948c..b022a34f 100644 --- a/src/app/features/room/message/thread-selector/ThreadSelector.tsx +++ b/src/app/features/room/message/thread-selector/ThreadSelector.tsx @@ -1,13 +1,10 @@ -import { Avatar, Box, Icon, Icons, Line, Text } from 'folds'; +import { Box, Icon, Icons, Line, Text } from 'folds'; import React, { ReactNode } from 'react'; import classNames from 'classnames'; import { IThreadBundledRelationship, Room } from 'matrix-js-sdk'; import * as css from './styles.css'; -import { UserAvatar } from '../../../../components/user-avatar'; -import { getMemberAvatarMxc, getMemberDisplayName } from '../../../../utils/room'; -import { useMatrixClient } from '../../../../hooks/useMatrixClient'; -import { useMediaAuthentication } from '../../../../hooks/useMediaAuthentication'; -import { getMxIdLocalPart, mxcUrlToHttp } from '../../../../utils/matrix'; +import { getMemberDisplayName } from '../../../../utils/room'; +import { getMxIdLocalPart } from '../../../../utils/matrix'; import { Time } from '../../../../components/message'; export function ThreadSelectorContainer({ children }: { children: ReactNode }) { @@ -29,13 +26,9 @@ export function ThreadSelector({ hour24Clock, dateFormatString, }: ThreadSelectorProps) { - const mx = useMatrixClient(); - const useAuthentication = useMediaAuthentication(); - const latestEvent = threadDetail.latest_event; const latestSenderId = latestEvent.sender; - const latestSenderAvatarMxc = getMemberAvatarMxc(room, latestSenderId); const latestDisplayName = getMemberDisplayName(room, latestSenderId) ?? getMxIdLocalPart(latestSenderId) ?? @@ -51,10 +44,10 @@ export function ThreadSelector({ alignItems="Center" gap="300" > - + - {threadDetail.count} {threadDetail.count === 1 ? 'Thread Reply' : 'Thread Replies'} + {threadDetail.count} {threadDetail.count === 1 ? 'Reply' : 'Replies'} {latestSenderId && ( @@ -65,35 +58,15 @@ export function ThreadSelector({ variant="SurfaceVariant" /> - - - } - /> - - - - Latest by {latestDisplayName} at{' '} - + Last reply by + {latestDisplayName} + diff --git a/src/app/features/room/message/thread-selector/styles.css.ts b/src/app/features/room/message/thread-selector/styles.css.ts index fbd15ecc..45bb7d62 100644 --- a/src/app/features/room/message/thread-selector/styles.css.ts +++ b/src/app/features/room/message/thread-selector/styles.css.ts @@ -9,7 +9,7 @@ export const ThreadSelectorContainer = style({ export const ThreadSelector = style([ ContainerColor({ variant: 'SurfaceVariant' }), { - padding: `${config.space.S200} ${config.space.S300}`, + padding: config.space.S200, borderRadius: config.radii.R400, cursor: 'pointer',