diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-02-09 00:26:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 00:26:57 +0100 |
commit | 76f3d5d16be2fb97d2252909589510165ec05e12 (patch) | |
tree | e46a34d048183f23e5d13dbdda9a0922e86a271f /app/views/stream_entries/_simple_status.html.haml | |
parent | 1167c6dbf8d5b8411d9924350b2b9735da6d9d26 (diff) |
Add preference to always display sensitive media (#6448)
Diffstat (limited to 'app/views/stream_entries/_simple_status.html.haml')
-rw-r--r-- | app/views/stream_entries/_simple_status.html.haml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index b594c9da6..ce723f1cc 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -23,6 +23,6 @@ - unless status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 610, height: 343) }} + %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343) }} - else - %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, sensitive: status.sensitive?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }} + %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }} |