Fixed leaving channels issue
Этот коммит содержится в:
@@ -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;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user