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
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
f013d91b89
Коммит
8c18da21f3
@@ -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,
|
||||
|
||||
Ссылка в новой задаче
Block a user