Skip to content

Commit

Permalink
Fix attachment list in conversation component (#2941)
Browse files Browse the repository at this point in the history
`media` is no longer part of `StatusContent`, so the attachment list wasn't shown in the private mentions column.

Signed-off-by: Plastikmensch <[email protected]>
  • Loading branch information
Plastikmensch authored Jan 15, 2025
1 parent dc2ce2b commit e489410
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand All @@ -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} />

Expand Down

0 comments on commit e489410

Please sign in to comment.