Skip to content

Commit

Permalink
Change media to be hidden/blurred by default in report modal (mastodo…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Dec 29, 2023
1 parent fcfdead commit 6374358
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/javascript/mastodon/components/media_attachments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
lang: PropTypes.string,
height: PropTypes.number,
width: PropTypes.number,
visible: PropTypes.bool,
};

static defaultProps = {
Expand Down Expand Up @@ -51,7 +52,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
};

render () {
const { status, width, height } = this.props;
const { status, width, height, visible } = this.props;
const mediaAttachments = status.get('media_attachments');
const language = status.getIn(['language', 'translation']) || status.get('language') || this.props.lang;

Expand Down Expand Up @@ -99,6 +100,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
height={height}
inline
sensitive={status.get('sensitive')}
visible={visible}
onOpenVideo={noop}
/>
)}
Expand All @@ -113,6 +115,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
lang={language}
sensitive={status.get('sensitive')}
defaultWidth={width}
visible={visible}
height={height}
onOpenMedia={noop}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class StatusCheckBox extends PureComponent {
</div>

<StatusContent status={status} />
<MediaAttachments status={status} />
<MediaAttachments status={status} visible={false} />
</div>
);

Expand Down

0 comments on commit 6374358

Please sign in to comment.