Move instances of Client.updateChannel() in components to an action (#4643)

* Move instances of Client.updateChannel() in components to an action

* update per code review
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2016-12-01 15:04:33 +01:00
коммит произвёл Joram Wilander
родитель f013d91b89
Коммит 8c18da21f3
2 изменённых файлов: 20 добавлений и 5 удалений

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

@@ -210,6 +210,24 @@ export function joinChannel(channel, success, error) {
);
}
export function updateChannel(channel, success, error) {
Client.updateChannel(
channel,
() => {
AsyncClient.getChannel(channel.id);
if (success) {
success();
}
},
(err) => {
if (error) {
error(err);
}
}
);
}
export function searchMoreChannels(term, success, error) {
Client.searchMoreChannels(
term,