Bläddra i källkod

[RN] Prepare for LoadingIndicator in LoginDialog

j8
Lyubo Marinov 8 år sedan
förälder
incheckning
70de9a683f

+ 2
- 0
react/features/authentication/actions.js Visa fil

52
 
52
 
53
                 dispatch(_upgradeRoleFinished(error));
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 Visa fil

216
      * @returns {void}
216
      * @returns {void}
217
      */
217
      */
218
     _onLogin() {
218
     _onLogin() {
219
-        const { _conference: conference } = this.props;
219
+        const { _conference: conference, dispatch } = this.props;
220
         const { username, password } = this.state;
220
         const { username, password } = this.state;
221
         const jid = toJid(username, this.props._configHosts);
221
         const jid = toJid(username, this.props._configHosts);
222
+        let r;
222
 
223
 
223
         // If there's a conference it means that the connection has succeeded,
224
         // If there's a conference it means that the connection has succeeded,
224
         // but authentication is required in order to join the room.
225
         // but authentication is required in order to join the room.
225
         if (conference) {
226
         if (conference) {
226
-            this.props.dispatch(
227
-                authenticateAndUpgradeRole(jid, password, conference));
227
+            r = dispatch(authenticateAndUpgradeRole(jid, password, conference));
228
         } else {
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 Visa fil

45
             JitsiConnectionEvents.CONNECTION_FAILED,
45
             JitsiConnectionEvents.CONNECTION_FAILED,
46
             _onConnectionFailed);
46
             _onConnectionFailed);
47
 
47
 
48
-        connection.connect({
48
+        return connection.connect({
49
             id,
49
             id,
50
             password
50
             password
51
         });
51
         });

Laddar…
Avbryt
Spara