Browse Source

Fix media spoiler of DetailedStatus (#5071)

master
abcang 7 years ago
committed by Eugen Rochko
parent
commit
e756c4f5ec
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/javascript/mastodon/components/media_gallery.js

+ 2
- 1
app/javascript/mastodon/components/media_gallery.js View File

@ -1,6 +1,7 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { is } from 'immutable';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';
@ -196,7 +197,7 @@ export default class MediaGallery extends React.PureComponent {
};
componentWillReceiveProps (nextProps) {
if (nextProps.sensitive !== this.props.sensitive) {
if (!is(nextProps.media, this.props.media)) {
this.setState({ visible: !nextProps.sensitive });
}
}

Loading…
Cancel
Save