Add preference to always display sensitive media (#6448)
This commit is contained in:
parent
1167c6dbf8
commit
76f3d5d16b
12 changed files with 38 additions and 26 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue