浏览代码

[RN] Prepare for LoadingIndicator in LoginDialog

j8
Lyubo Marinov 8 年前
父节点
当前提交
70de9a683f

+ 2
- 0
react/features/authentication/actions.js 查看文件

@@ -52,6 +52,8 @@ export function authenticateAndUpgradeRole(
52 52
 
53 53
                 dispatch(_upgradeRoleFinished(error));
54 54
             });
55
+
56
+        return process;
55 57
     };
56 58
 }
57 59
 

+ 6
- 4
react/features/authentication/components/LoginDialog.native.js 查看文件

@@ -216,18 +216,20 @@ class LoginDialog extends Component {
216 216
      * @returns {void}
217 217
      */
218 218
     _onLogin() {
219
-        const { _conference: conference } = this.props;
219
+        const { _conference: conference, dispatch } = this.props;
220 220
         const { username, password } = this.state;
221 221
         const jid = toJid(username, this.props._configHosts);
222
+        let r;
222 223
 
223 224
         // If there's a conference it means that the connection has succeeded,
224 225
         // but authentication is required in order to join the room.
225 226
         if (conference) {
226
-            this.props.dispatch(
227
-                authenticateAndUpgradeRole(jid, password, conference));
227
+            r = dispatch(authenticateAndUpgradeRole(jid, password, conference));
228 228
         } else {
229
-            this.props.dispatch(connect(jid, password));
229
+            r = dispatch(connect(jid, password));
230 230
         }
231
+
232
+        return r;
231 233
     }
232 234
 }
233 235
 

+ 1
- 1
react/features/base/connection/actions.native.js 查看文件

@@ -45,7 +45,7 @@ export function connect(id: ?string, password: ?string) {
45 45
             JitsiConnectionEvents.CONNECTION_FAILED,
46 46
             _onConnectionFailed);
47 47
 
48
-        connection.connect({
48
+        return connection.connect({
49 49
             id,
50 50
             password
51 51
         });

正在加载...
取消
保存