Load channel members with channels to make sure we have latest unread counts (#4389)

Этот коммит содержится в:
Joram Wilander
2016-11-01 11:13:33 -04:00
коммит произвёл GitHub
родитель 9bae1f7e93
Коммит 92642bab68
6 изменённых файлов: 25 добавлений и 20 удалений

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

@@ -13,6 +13,8 @@ import {browserHistory} from 'react-router/es6';
import React from 'react';
import {loadChannelsForCurrentUser} from 'actions/channel_actions.jsx';
export default class DeleteChannelModal extends React.Component {
constructor(props) {
super(props);
@@ -29,7 +31,7 @@ export default class DeleteChannelModal extends React.Component {
Client.deleteChannel(
this.props.channel.id,
() => {
AsyncClient.getChannels(true);
loadChannelsForCurrentUser();
},
(err) => {
AsyncClient.dispatchError(err, 'handleDelete');

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

@@ -115,7 +115,8 @@ export default class Navbar extends React.Component {
Client.leaveChannel(channelId,
() => {
AsyncClient.getChannels(true);
ChannelActions.loadChannelsForCurrentUser();
if (this.state.isFavorite) {
ChannelActions.unmarkFavorite(channelId);
}