0
0
Fork 0

Add a new preference to always hide all media (#8569)

This commit is contained in:
ふぁぼ原 2018-09-25 12:09:35 +09:00 committed by Eugen Rochko
parent 4b794e134d
commit f7a6f9489d
14 changed files with 72 additions and 45 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, displaySensitiveMedia } from '../initial_state';
import { autoPlayGif, displayMedia } from '../initial_state';
const messages = defineMessages({
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' },
@ -197,7 +197,7 @@ class MediaGallery extends React.PureComponent {
};
state = {
visible: !this.props.sensitive || displaySensitiveMedia,
visible: displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all',
};
componentWillReceiveProps (nextProps) {