Browse Source

Coding style: naming, consistency

j8
Lyubo Marinov 7 years ago
parent
commit
796489dc77

+ 3
- 3
react/features/base/jwt/middleware.js View File

77
     const result = next(action);
77
     const result = next(action);
78
 
78
 
79
     const state = getState();
79
     const state = getState();
80
-    const stateFeaturesJWT = state['features/base/jwt'];
80
+    const stateFeaturesBaseJWT = state['features/base/jwt'];
81
     let calleeInfoVisible;
81
     let calleeInfoVisible;
82
 
82
 
83
-    if (stateFeaturesJWT.callee) {
83
+    if (stateFeaturesBaseJWT.callee) {
84
         const { conference, leaving, room } = state['features/base/conference'];
84
         const { conference, leaving, room } = state['features/base/conference'];
85
 
85
 
86
         // XXX The CalleeInfo is to be displayed/visible as soon as possible
86
         // XXX The CalleeInfo is to be displayed/visible as soon as possible
112
                 // However, the CallDialog is not to be displayed/visible again
112
                 // However, the CallDialog is not to be displayed/visible again
113
                 // after all remote participants leave.
113
                 // after all remote participants leave.
114
                 if (calleeInfoVisible
114
                 if (calleeInfoVisible
115
-                        && stateFeaturesJWT.calleeInfoVisible === false) {
115
+                        && stateFeaturesBaseJWT.calleeInfoVisible === false) {
116
                     calleeInfoVisible = false;
116
                     calleeInfoVisible = false;
117
                 }
117
                 }
118
                 break;
118
                 break;

+ 17
- 18
react/features/overlay/components/AbstractPageReloadOverlay.js View File

31
      */
31
      */
32
     static propTypes = {
32
     static propTypes = {
33
         /**
33
         /**
34
-         * The details is an object containing more information
35
-         * about the connection failed(shard changes, was the computer
36
-         * suspended, etc.).
34
+         * The details is an object containing more information about the
35
+         * connection failed (shard changes, was the computer suspended, etc.)
37
          *
36
          *
38
          * @public
37
          * @public
39
          * @type {object}
38
          * @type {object}
86
             (connectionError && isFatalJitsiConnectionError(connectionError))
85
             (connectionError && isFatalJitsiConnectionError(connectionError))
87
                 || (conferenceError
86
                 || (conferenceError
88
                     && isFatalJitsiConferenceError(conferenceError))
87
                     && isFatalJitsiConferenceError(conferenceError))
89
-                || configError
90
-        );
88
+                || configError);
91
     }
89
     }
92
 
90
 
93
     _interval: ?number
91
     _interval: ?number
173
         // FIXME: We should dispatch action for this.
171
         // FIXME: We should dispatch action for this.
174
         if (typeof APP !== 'undefined') {
172
         if (typeof APP !== 'undefined') {
175
             if (APP.conference && APP.conference._room) {
173
             if (APP.conference && APP.conference._room) {
176
-                APP.conference._room.sendApplicationLog(JSON.stringify(
177
-                    {
178
-                        name: 'page.reload',
179
-                        label: this.props.reason
180
-                    }));
174
+                APP.conference._room.sendApplicationLog(JSON.stringify({
175
+                    name: 'page.reload',
176
+                    label: this.props.reason
177
+                }));
181
             }
178
             }
182
         }
179
         }
183
 
180
 
184
         sendAnalytics(createPageReloadScheduledEvent(
181
         sendAnalytics(createPageReloadScheduledEvent(
185
-            this.props.reason, this.state.timeoutSeconds, this.props.details));
182
+            this.props.reason,
183
+            this.state.timeoutSeconds,
184
+            this.props.details));
186
 
185
 
187
         logger.info(
186
         logger.info(
188
             `The conference will be reloaded after ${
187
             `The conference will be reloaded after ${
268
  * @param {Object} state - The redux state.
267
  * @param {Object} state - The redux state.
269
  * @protected
268
  * @protected
270
  * @returns {{
269
  * @returns {{
270
+ *     details: Object,
271
  *     isNetworkFailure: boolean,
271
  *     isNetworkFailure: boolean,
272
- *     reason: string,
273
- *     details: Object
272
+ *     reason: string
274
  * }}
273
  * }}
275
  */
274
  */
276
 export function abstractMapStateToProps(state: Object) {
275
 export function abstractMapStateToProps(state: Object) {
277
-    const conferenceError = state['features/base/conference'].error;
278
-    const configError = state['features/base/config'].error;
279
-    const connectionError = state['features/base/connection'].error;
276
+    const { error: conferenceError } = state['features/base/conference'];
277
+    const { error: configError } = state['features/base/config'];
278
+    const { error: connectionError } = state['features/base/connection'];
280
 
279
 
281
     return {
280
     return {
281
+        details: connectionError ? connectionError.details : undefined,
282
         isNetworkFailure: Boolean(configError || connectionError),
282
         isNetworkFailure: Boolean(configError || connectionError),
283
-        reason: (configError || connectionError || conferenceError).message,
284
-        details: connectionError ? connectionError.details : undefined
283
+        reason: (configError || connectionError || conferenceError).message
285
     };
284
     };
286
 }
285
 }

Loading…
Cancel
Save