Changed direct channels in the sidebar to be displayed based on user preferences

Этот коммит содержится в:
hmhealey
2015-10-02 09:50:34 -04:00
родитель a087403e9f
Коммит 7d03c24b44
5 изменённых файлов: 308 добавлений и 37 удалений

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

@@ -637,3 +637,32 @@ export function getMyTeam() {
}
);
}
export function getDirectChannels() {
if (isCallInProgress('getDirectChannels')) {
return;
}
callTracker.getDirectChannels = utils.getTimestamp();
client.getPreferencesByName(
'direct_channels',
'show_hide',
(data, textStatus, xhr) => {
callTracker.getDirectChannels = 0;
if (xhr.status === 304 || !data) {
return;
}
AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_PREFERENCES,
preferences: data
});
},
(err) => {
callTracker.getDirectChannels = 0;
dispatchError(err, 'getDirectChannels');
}
);
}