Improve perf for channel switching, fix team switching issues (#6286)

* Improve perf for channel switching, fix team switching issues

* Fix last channel when switching teams
Этот коммит содержится в:
Joram Wilander
2017-05-02 09:28:44 -04:00
коммит произвёл Harrison Healey
родитель 294bd08255
Коммит 042052aec6
4 изменённых файлов: 11 добавлений и 25 удалений

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

@@ -25,7 +25,7 @@ import store from 'stores/redux_store.jsx';
const dispatch = store.dispatch;
const getState = store.getState;
import {getProfilesByIds} from 'mattermost-redux/actions/users';
import {getChannelMember} from 'mattermost-redux/actions/channels';
import {getMyChannelMember} from 'mattermost-redux/actions/channels';
export function handleNewPost(post, msg) {
let websocketMessageProps = {};
@@ -41,7 +41,7 @@ export function handleNewPost(post, msg) {
Client.setTeamId(msg.data.team_id);
}
getChannelMember(post.channel_id, UserStore.getCurrentId())(dispatch, getState).then(() => completePostReceive(post, websocketMessageProps));
getMyChannelMember(post.channel_id)(dispatch, getState).then(() => completePostReceive(post, websocketMessageProps));
}
if (msg && msg.data) {