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

View file

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

View file

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