Commit afa52e4d authored by abcang's avatar abcang Committed by Eugen Rochko

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

parent 8949aad0
......@@ -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 });
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment