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

remotes/1703361221475462875/rebase/4.0.0rc1
Claire 2022-07-24 13:16:03 +02:00
parent db5b44330d
commit a5f81e1abd
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' />