Rename areStatesEqual to areObjectsEqual and make it more comprehensive and accurate.
Этот коммит содержится в:
@@ -173,7 +173,7 @@ export default class Sidebar extends React.Component {
|
||||
window.addEventListener('resize', this.handleResize);
|
||||
}
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
if (!Utils.areStatesEqual(nextState, this.state)) {
|
||||
if (!Utils.areObjectsEqual(nextState, this.state)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -205,10 +205,7 @@ export default class Sidebar extends React.Component {
|
||||
}
|
||||
}
|
||||
onChange() {
|
||||
var newState = this.getStateFromStores();
|
||||
if (!Utils.areStatesEqual(newState, this.state)) {
|
||||
this.setState(newState);
|
||||
}
|
||||
this.setState(this.getStateFromStores());
|
||||
}
|
||||
updateTitle() {
|
||||
const channel = ChannelStore.getCurrent();
|
||||
|
||||
Ссылка в новой задаче
Block a user