Этот коммит содержится в:
Christopher Speller
2015-11-04 12:23:55 -05:00
родитель ebce34190a
Коммит 1afd2f1ac1

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

@@ -81,7 +81,7 @@ export default class PostsViewContainer extends React.Component {
} }
} }
onChannelChange() { onChannelChange() {
const postLists = Object.assign({}, this.state.postLists); const postLists = this.state.postLists.slice();
const channels = this.state.channels.slice(); const channels = this.state.channels.slice();
const channelId = ChannelStore.getCurrentId(); const channelId = ChannelStore.getCurrentId();
@@ -112,7 +112,7 @@ export default class PostsViewContainer extends React.Component {
postLists}); postLists});
} }
onChannelLeave(id) { onChannelLeave(id) {
const postLists = Object.assign({}, this.state.postLists); const postLists = this.state.postLists.slice();
const channels = this.state.channels.slice(); const channels = this.state.channels.slice();
const index = channels.indexOf(id); const index = channels.indexOf(id);
if (index !== -1) { if (index !== -1) {
@@ -123,7 +123,7 @@ export default class PostsViewContainer extends React.Component {
} }
onPostsChange() { onPostsChange() {
const channels = this.state.channels; const channels = this.state.channels;
const postLists = Object.assign({}, this.state.postLists); const postLists = this.state.postLists.slice();
const newPostsView = this.getChannelPosts(channels[this.state.currentChannelIndex]); const newPostsView = this.getChannelPosts(channels[this.state.currentChannelIndex]);
postLists[this.state.currentChannelIndex] = newPostsView; postLists[this.state.currentChannelIndex] = newPostsView;