Fix multiple pinned post issues (#6887)
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
2190a288e0
Коммит
0c910cc8c5
@@ -77,12 +77,12 @@ export default class SidebarRight extends React.Component {
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
return !Utils.areObjectsEqual(nextState, this.state) || !Utils.areObjectsEqual(nextProps, this.props);
|
||||
return !Utils.areObjectsEqual(nextState, this.state) || this.props.postRightVisible !== nextProps.postRightVisible;
|
||||
}
|
||||
|
||||
componentWillUpdate(nextProps, nextState) {
|
||||
const isOpen = this.state.searchVisible || this.props.postRightVisible;
|
||||
const willOpen = nextState.searchVisible || nextState.postRightVisible;
|
||||
const willOpen = nextState.searchVisible || nextProps.postRightVisible;
|
||||
|
||||
if (!isOpen && willOpen) {
|
||||
trackEvent('ui', 'ui_rhs_opened');
|
||||
|
||||
Ссылка в новой задаче
Block a user