about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-15 15:35:13 +0100
committerThibG <thib@sitedethib.com>2018-11-15 16:38:50 +0100
commit86527024aa392ad6edf5b1d0dc7fe936b7ad4968 (patch)
tree1c06b3b8fc656691c96210ec6fab49821741b67b
parenta100f05687a592220a0dc705652d9e9340e093ba (diff)
In detailed status view, take displayMedia setting into account when changing media
Fixes #819
-rw-r--r--app/javascript/flavours/glitch/components/media_gallery.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js
index e8dfd6f8e..d637d7c8e 100644
--- a/app/javascript/flavours/glitch/components/media_gallery.js
+++ b/app/javascript/flavours/glitch/components/media_gallery.js
@@ -232,7 +232,7 @@ export default class MediaGallery extends React.PureComponent {
 
   componentWillReceiveProps (nextProps) {
     if (!is(nextProps.media, this.props.media)) {
-      this.setState({ visible: !nextProps.sensitive });
+      this.setState({ visible: nextProps.revealed === undefined ? (displayMedia !== 'hide_all' && !nextProps.sensitive || displayMedia === 'show_all') : nextProps.revealed });
     }
   }