Improve interaction between out-of-CW attachments and collapsed toots

This commit is contained in:
Claire 2022-07-24 13:16:03 +02:00
parent 42d06afe03
commit 711301519a
3 changed files with 8 additions and 4 deletions

View file

@ -771,6 +771,7 @@ class Status extends ImmutablePureComponent {
<StatusContent
status={status}
media={contentMedia}
extraMedia={extraMedia}
mediaIcons={contentMediaIcons}
expanded={isExpanded}
onExpandedToggle={this.handleExpandedToggle}
@ -780,8 +781,6 @@ class Status extends ImmutablePureComponent {
rewriteMentions={settings.get('rewrite_mentions')}
/>
{extraMedia}
{!isCollapsed || !(muted || !settings.getIn(['collapsed', 'show_action_bar'])) ? (
<StatusActionBar
{...other}

View file

@ -70,6 +70,7 @@ export default class StatusContent extends React.PureComponent {
collapsed: PropTypes.bool,
onExpandedToggle: PropTypes.func,
media: PropTypes.node,
extraMedia: PropTypes.node,
mediaIcons: PropTypes.arrayOf(PropTypes.string),
parseClick: PropTypes.func,
disabled: PropTypes.bool,
@ -256,6 +257,7 @@ export default class StatusContent extends React.PureComponent {
const {
status,
media,
extraMedia,
mediaIcons,
parseClick,
disabled,
@ -351,6 +353,8 @@ export default class StatusContent extends React.PureComponent {
{media}
</div>
{extraMedia}
</div>
);
} else if (parseClick) {
@ -372,6 +376,7 @@ export default class StatusContent extends React.PureComponent {
lang={lang}
/>
{media}
{extraMedia}
</div>
);
} else {
@ -391,6 +396,7 @@ export default class StatusContent extends React.PureComponent {
lang={lang}
/>
{media}
{extraMedia}
</div>
);
}

View file

@ -296,6 +296,7 @@ class DetailedStatus extends ImmutablePureComponent {
<StatusContent
status={status}
media={contentMedia}
extraMedia={extraMedia}
mediaIcons={contentMediaIcons}
expanded={expanded}
collapsed={false}
@ -307,8 +308,6 @@ class DetailedStatus extends ImmutablePureComponent {
disabled
/>
{extraMedia}
<div className='detailed-status__meta'>
<a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener noreferrer'>
<FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />