Fix attachment list in conversation component (#2941)

`media` is no longer part of `StatusContent`, so the attachment list wasn't shown in the private mentions column.

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
This commit is contained in:
Plastikmensch 2025-01-15 08:18:39 +01:00 committed by GitHub
parent dc2ce2b305
commit e489410b0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,11 +177,6 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown })
toggleHidden: handleShowMore,
};
let media = null;
if (lastStatus.get('media_attachments').size > 0) {
media = <AttachmentList compact media={lastStatus.get('media_attachments')} />;
}
return (
<HotKeys handlers={handlers}>
<div className={classNames('conversation focusable muted', { unread })} tabIndex={0}>
@ -206,9 +201,15 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown })
expanded={sharedCWState ? lastStatus.get('hidden') : expanded}
onExpandedToggle={handleShowMore}
collapsible
media={media}
/>
{lastStatus.get('media_attachments').size > 0 && (
<AttachmentList
compact
media={lastStatus.get('media_attachments')}
/>
)}
<div className='status__action-bar'>
<IconButton className='status__action-bar-button' title={intl.formatMessage(messages.reply)} icon='reply' iconComponent={ReplyIcon} onClick={handleReply} />