diff options
author | Björn Roland <bjoernr-de@users.noreply.github.com> | 2016-12-21 18:48:06 +0100 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-12-21 12:48:06 -0500 |
commit | f0f53260984a210f44458d86ed5ac9e3afb3f363 (patch) | |
tree | 0e1ce408c07906b66eaf5355ffde07b637ccf19a /webapp/components/team_members_dropdown.jsx | |
parent | cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb (diff) | |
download | chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.tar.gz chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.tar.bz2 chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.zip |
#4698 Move Client.updateActive() in components to an action (#4858)
* #4698 Move instances of Client.updateActive() in components to an action
* Use null for empty success function
Diffstat (limited to 'webapp/components/team_members_dropdown.jsx')
-rw-r--r-- | webapp/components/team_members_dropdown.jsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webapp/components/team_members_dropdown.jsx b/webapp/components/team_members_dropdown.jsx index b2fae4585..1961d6b5a 100644 --- a/webapp/components/team_members_dropdown.jsx +++ b/webapp/components/team_members_dropdown.jsx @@ -8,6 +8,7 @@ import UserStore from 'stores/user_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import {removeUserFromTeam} from 'actions/team_actions.jsx'; +import {updateActive} from 'actions/user_actions.jsx'; import Client from 'client/web_client.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -74,9 +75,8 @@ export default class TeamMembersDropdown extends React.Component { } handleMakeActive() { - Client.updateActive(this.props.user.id, true, + updateActive(this.props.user.id, true, () => { - AsyncClient.getUser(this.props.user.id); AsyncClient.getChannelStats(ChannelStore.getCurrentId()); AsyncClient.getTeamStats(this.props.teamMember.team_id); }, @@ -87,9 +87,8 @@ export default class TeamMembersDropdown extends React.Component { } handleMakeNotActive() { - Client.updateActive(this.props.user.id, false, + updateActive(this.props.user.id, false, () => { - AsyncClient.getUser(this.props.user.id); AsyncClient.getChannelStats(ChannelStore.getCurrentId()); AsyncClient.getTeamStats(this.props.teamMember.team_id); }, |