0
0
Fork 0

Add preference to always display sensitive media (#6448)

This commit is contained in:
Eugen Rochko 2018-02-09 00:26:57 +01:00 committed by GitHub
parent 1167c6dbf8
commit 76f3d5d16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 38 additions and 26 deletions

View file

@ -6,7 +6,7 @@ import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';
import classNames from 'classnames';
import { autoPlayGif } from '../initial_state';
import { autoPlayGif, displaySensitiveMedia } from '../initial_state';
const messages = defineMessages({
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' },
@ -187,7 +187,7 @@ export default class MediaGallery extends React.PureComponent {
};
state = {
visible: !this.props.sensitive,
visible: !this.props.sensitive || displaySensitiveMedia,
};
componentWillReceiveProps (nextProps) {