prevent image preview to default view when adding/removing reaction (#6910)

Этот коммит содержится в:
Saturnino Abril
2017-07-13 08:47:08 +09:00
коммит произвёл Joram Wilander
родитель 9dcb339f12
Коммит 9a654d7b27

Просмотреть файл

@@ -55,10 +55,12 @@ export default class PostBodyAdditionalContent extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
this.setState({
embedVisible: nextProps.previewCollapsed.startsWith('false'),
link: Utils.extractFirstLink(nextProps.post.message)
});
if (nextProps.previewCollapsed !== this.props.previewCollapsed || nextProps.post.message !== this.props.post.message) {
this.setState({
embedVisible: nextProps.previewCollapsed.startsWith('false'),
link: Utils.extractFirstLink(nextProps.post.message)
});
}
}
toggleEmbedVisibility() {