Skip to content
Snippets Groups Projects
Commit afa52e4d authored by abcang's avatar abcang Committed by Eugen Rochko
Browse files

Fixed issue that the NSFW image is not hidden on detail page (#4244)

parent 8949aad0
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,12 @@ export default class MediaGallery extends React.PureComponent {
visible: !this.props.sensitive,
};
componentWillReceiveProps (nextProps) {
if (nextProps.sensitive !== this.props.sensitive) {
this.setState({ visible: !nextProps.sensitive });
}
}
handleOpen = () => {
this.setState({ visible: !this.state.visible });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment