Coding style: naming, consistency

This commit is contained in:
Lyubo Marinov 2018-03-04 19:27:15 -06:00
parent a30412ba65
commit 796489dc77
2 changed files with 20 additions and 21 deletions

View File

@ -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;

View File

@ -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
};
}