Merge pull request #1409 from mattermost/plt-961

PLT-961 Rename areStatesEqual to areObjectsEqual and make it more comprehensive and accurate.
Этот коммит содержится в:
Corey Hulen
2015-11-12 10:12:34 -08:00
родитель 6f7b7169b2 50815f9be7
Коммит b6049721f9
28 изменённых файлов: 138 добавлений и 47 удалений

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

@@ -175,7 +175,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;
@@ -207,10 +207,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();