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

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

@@ -31,9 +31,8 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
31 31
      */
32 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 37
          * @public
39 38
          * @type {object}
@@ -86,8 +85,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
86 85
             (connectionError && isFatalJitsiConnectionError(connectionError))
87 86
                 || (conferenceError
88 87
                     && isFatalJitsiConferenceError(conferenceError))
89
-                || configError
90
-        );
88
+                || configError);
91 89
     }
92 90
 
93 91
     _interval: ?number
@@ -173,16 +171,17 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
173 171
         // FIXME: We should dispatch action for this.
174 172
         if (typeof APP !== 'undefined') {
175 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 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 186
         logger.info(
188 187
             `The conference will be reloaded after ${
@@ -268,19 +267,19 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
268 267
  * @param {Object} state - The redux state.
269 268
  * @protected
270 269
  * @returns {{
270
+ *     details: Object,
271 271
  *     isNetworkFailure: boolean,
272
- *     reason: string,
273
- *     details: Object
272
+ *     reason: string
274 273
  * }}
275 274
  */
276 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 280
     return {
281
+        details: connectionError ? connectionError.details : undefined,
282 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