From efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Mon, 23 Jan 2017 18:03:57 +0900 Subject: Move instances of Client.updateUserNotifyProps() in components to an action (#5156) --- webapp/components/user_settings/user_settings_notifications.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/user_settings/user_settings_notifications.jsx b/webapp/components/user_settings/user_settings_notifications.jsx index 2ee33c092..672f8d6b7 100644 --- a/webapp/components/user_settings/user_settings_notifications.jsx +++ b/webapp/components/user_settings/user_settings_notifications.jsx @@ -8,10 +8,9 @@ import DesktopNotificationSettings from './desktop_notification_settings.jsx'; import UserStore from 'stores/user_store.jsx'; -import Client from 'client/web_client.jsx'; -import * as AsyncClient from 'utils/async_client.jsx'; import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; +import {updateUserNotifyProps} from 'actions/user_actions.jsx'; import EmailNotificationSetting from './email_notification_setting.jsx'; import {FormattedMessage} from 'react-intl'; @@ -143,10 +142,10 @@ export default class NotificationsTab extends React.Component { data.first_name = this.state.firstNameKey.toString(); data.channel = this.state.channelKey.toString(); - Client.updateUserNotifyProps(data, + updateUserNotifyProps( + data, () => { this.props.updateSection(''); - AsyncClient.getMe(); $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update'); }, (err) => { -- cgit v1.2.3-1-g7c22