From efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd Mon Sep 17 00:00:00 2001
From: Saturnino Abril <saturnino.abril@gmail.com>
Date: Mon, 23 Jan 2017 18:03:57 +0900
Subject: Move instances of Client.updateUserNotifyProps() in components to an
 action (#5156)

---
 webapp/actions/user_actions.jsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'webapp/actions/user_actions.jsx')

diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index 76879b5f5..94546cf36 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -453,6 +453,24 @@ export function generateMfaSecret(success, error) {
     );
 }
 
+export function updateUserNotifyProps(data, success, error) {
+    Client.updateUserNotifyProps(
+      data,
+      () => {
+          AsyncClient.getMe();
+
+          if (success) {
+              success();
+          }
+      },
+      (err) => {
+          if (error) {
+              error(err);
+          }
+      }
+    );
+}
+
 export function updateUserRoles(userId, newRoles, success, error) {
     Client.updateUserRoles(
       userId,
-- 
cgit v1.2.3-1-g7c22

