浏览代码

Update UIDesktop.js

Nariman Jelveh 1 年之前
父节点
当前提交
695d7b8654
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/UI/UIDesktop.js

+ 8 - 0
src/UI/UIDesktop.js

@@ -332,6 +332,14 @@ async function UIDesktop(options){
         refresh_user_data(window.auth_token);
     });
 
+    socket.on('user.email_changed', (msg) => {
+        // don't update if this is the original client that initiated the action
+        if(msg.original_client_socket_id === window.socket.id)
+            return;
+
+        refresh_user_data(window.auth_token);
+    });
+
     socket.on('item.renamed', async (item) => {
         // Notify all apps that are watching this item
         sendItemChangeEventToWatchingApps(item.uid, {