Merge pull request #1577 from mattermost/plt-1307

PLT-1307 Make proper async calls when switching channels
Этот коммит содержится в:
Joram Wilander
2015-12-02 11:29:51 -05:00
родитель ac3f0335be 2abb0ae354
Коммит 2b7ce16ea9
4 изменённых файлов: 73 добавлений и 60 удалений

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

@@ -106,10 +106,15 @@ export function getChannel(id) {
);
}
export function updateLastViewedAt() {
const channelId = ChannelStore.getCurrentId();
export function updateLastViewedAt(id) {
let channelId;
if (id) {
channelId = id;
} else {
channelId = ChannelStore.getCurrentId();
}
if (channelId === null) {
if (channelId == null) {
return;
}
@@ -159,8 +164,13 @@ export function getMoreChannels(force) {
}
}
export function getChannelExtraInfo() {
const channelId = ChannelStore.getCurrentId();
export function getChannelExtraInfo(id) {
let channelId;
if (id) {
channelId = id;
} else {
channelId = ChannelStore.getCurrentId();
}
if (channelId != null) {
if (isCallInProgress('getChannelExtraInfo_' + channelId)) {