From 796489dc77c448a0eb5cbaf95fe6e396e1ca81bf Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Sun, 4 Mar 2018 19:27:15 -0600 Subject: [PATCH] Coding style: naming, consistency --- react/features/base/jwt/middleware.js | 6 ++-- .../components/AbstractPageReloadOverlay.js | 35 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/react/features/base/jwt/middleware.js b/react/features/base/jwt/middleware.js index 375417b27..75664a74d 100644 --- a/react/features/base/jwt/middleware.js +++ b/react/features/base/jwt/middleware.js @@ -77,10 +77,10 @@ function _maybeSetCalleeInfoVisible({ dispatch, getState }, next, action) { const result = next(action); const state = getState(); - const stateFeaturesJWT = state['features/base/jwt']; + const stateFeaturesBaseJWT = state['features/base/jwt']; let calleeInfoVisible; - if (stateFeaturesJWT.callee) { + if (stateFeaturesBaseJWT.callee) { const { conference, leaving, room } = state['features/base/conference']; // XXX The CalleeInfo is to be displayed/visible as soon as possible @@ -112,7 +112,7 @@ function _maybeSetCalleeInfoVisible({ dispatch, getState }, next, action) { // However, the CallDialog is not to be displayed/visible again // after all remote participants leave. if (calleeInfoVisible - && stateFeaturesJWT.calleeInfoVisible === false) { + && stateFeaturesBaseJWT.calleeInfoVisible === false) { calleeInfoVisible = false; } break; diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.js index 96bbabc73..c2ddc0152 100644 --- a/react/features/overlay/components/AbstractPageReloadOverlay.js +++ b/react/features/overlay/components/AbstractPageReloadOverlay.js @@ -31,9 +31,8 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { */ static propTypes = { /** - * The details is an object containing more information - * about the connection failed(shard changes, was the computer - * suspended, etc.). + * The details is an object containing more information about the + * connection failed (shard changes, was the computer suspended, etc.) * * @public * @type {object} @@ -86,8 +85,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { (connectionError && isFatalJitsiConnectionError(connectionError)) || (conferenceError && isFatalJitsiConferenceError(conferenceError)) - || configError - ); + || configError); } _interval: ?number @@ -173,16 +171,17 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { // FIXME: We should dispatch action for this. if (typeof APP !== 'undefined') { if (APP.conference && APP.conference._room) { - APP.conference._room.sendApplicationLog(JSON.stringify( - { - name: 'page.reload', - label: this.props.reason - })); + APP.conference._room.sendApplicationLog(JSON.stringify({ + name: 'page.reload', + label: this.props.reason + })); } } sendAnalytics(createPageReloadScheduledEvent( - this.props.reason, this.state.timeoutSeconds, this.props.details)); + this.props.reason, + this.state.timeoutSeconds, + this.props.details)); logger.info( `The conference will be reloaded after ${ @@ -268,19 +267,19 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { * @param {Object} state - The redux state. * @protected * @returns {{ + * details: Object, * isNetworkFailure: boolean, - * reason: string, - * details: Object + * reason: string * }} */ export function abstractMapStateToProps(state: Object) { - const conferenceError = state['features/base/conference'].error; - const configError = state['features/base/config'].error; - const connectionError = state['features/base/connection'].error; + const { error: conferenceError } = state['features/base/conference']; + const { error: configError } = state['features/base/config']; + const { error: connectionError } = state['features/base/connection']; return { + details: connectionError ? connectionError.details : undefined, isNetworkFailure: Boolean(configError || connectionError), - reason: (configError || connectionError || conferenceError).message, - details: connectionError ? connectionError.details : undefined + reason: (configError || connectionError || conferenceError).message }; }