From 651c3d643c078abeb04099c2f1e54d335d60478f Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 29 Jun 2017 22:48:22 -0700 Subject: [PATCH] Images behind CWs in detailed statuses too --- .../features/status/components/detailed_status.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 619957dbe..e6bbcf6a0 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -38,6 +38,7 @@ export default class DetailedStatus extends ImmutablePureComponent { const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status; let media = ''; + let mediaIcon = null; let applicationLink = ''; if (status.get('media_attachments').size > 0) { @@ -45,12 +46,12 @@ export default class DetailedStatus extends ImmutablePureComponent { media = ; } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { media = ; + mediaIcon = 'video-camera'; } else { media = ; + mediaIcon = 'picture-o'; } - } else if (status.get('spoiler_text').length === 0) { - media = ; - } + } else media = ; if (status.get('application')) { applicationLink = ยท {status.getIn(['application', 'name'])}; @@ -63,9 +64,7 @@ export default class DetailedStatus extends ImmutablePureComponent { - - - {media} + {media}