about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-04-14 12:27:14 +0200
committerThibaut Girka <thib@sitedethib.com>2018-04-14 12:27:14 +0200
commitdfe8abb8cdb64e88cd7204ad52813e38fb4030a8 (patch)
tree3ef817498ef7a539c34c0941e5357b055dca39e2 /app/javascript/flavours/glitch/components
parent95a892accdb6a081447117f49c66431dc7e032fb (diff)
[Glitch] Handle preference to always display sensitive media
Port the UI part of 76f3d5d16be2fb97d2252909589510165ec05e12 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/media_gallery.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js
index 6928af6d6..3b71a7475 100644
--- a/app/javascript/flavours/glitch/components/media_gallery.js
+++ b/app/javascript/flavours/glitch/components/media_gallery.js
@@ -6,7 +6,7 @@ import IconButton from './icon_button';
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import { isIOS } from 'flavours/glitch/util/is_mobile';
 import classNames from 'classnames';
-import { autoPlayGif } from 'flavours/glitch/util/initial_state';
+import { autoPlayGif, displaySensitiveMedia } from 'flavours/glitch/util/initial_state';
 
 const messages = defineMessages({
   hidden: {
@@ -208,7 +208,7 @@ export default class MediaGallery extends React.PureComponent {
   };
 
   state = {
-    visible: !this.props.sensitive,
+    visible: !this.props.sensitive || displaySensitiveMedia,
   };
 
   componentWillReceiveProps (nextProps) {