]> cat aescling's git repositories - mastodon.git/commitdiff
In detailed status view, take displayMedia setting into account when changing media
authorThibaut Girka <thib@sitedethib.com>
Thu, 15 Nov 2018 14:35:13 +0000 (15:35 +0100)
committerThibG <thib@sitedethib.com>
Thu, 15 Nov 2018 15:38:50 +0000 (16:38 +0100)
Fixes #819

app/javascript/flavours/glitch/components/media_gallery.js

index e8dfd6f8e730c2bde8cb5df569e0070761cb6d92..d637d7c8ec43e365e9904bae7b28ca37156b0718 100644 (file)
@@ -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 });
     }
   }
 
This page took 0.030972 seconds and 3 git commands to generate.