Hide media in report modal regardless of whether they are marked sensitive
The rationale behind this is that if the user wants to report violent media, they might not want to see it repeatedly. The “sensitive” property is still kept, displaying different messages for hidden media depending on whether they are marked as sensitive.
This commit is contained in:
@@ -202,6 +202,7 @@ export default class MediaGallery extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
sensitive: PropTypes.bool,
|
||||
revealed: PropTypes.bool,
|
||||
standalone: PropTypes.bool,
|
||||
letterbox: PropTypes.bool,
|
||||
fullwidth: PropTypes.bool,
|
||||
@@ -216,7 +217,7 @@ export default class MediaGallery extends React.PureComponent {
|
||||
};
|
||||
|
||||
state = {
|
||||
visible: !this.props.sensitive || displaySensitiveMedia,
|
||||
visible: this.props.revealed === undefined ? (!this.props.sensitive || displaySensitiveMedia) : this.props.revealed,
|
||||
};
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
|
||||
Reference in New Issue
Block a user