Coding style: naming, consistency
This commit is contained in:
parent
a30412ba65
commit
796489dc77
|
@ -77,10 +77,10 @@ function _maybeSetCalleeInfoVisible({ dispatch, getState }, next, action) {
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
|
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const stateFeaturesJWT = state['features/base/jwt'];
|
const stateFeaturesBaseJWT = state['features/base/jwt'];
|
||||||
let calleeInfoVisible;
|
let calleeInfoVisible;
|
||||||
|
|
||||||
if (stateFeaturesJWT.callee) {
|
if (stateFeaturesBaseJWT.callee) {
|
||||||
const { conference, leaving, room } = state['features/base/conference'];
|
const { conference, leaving, room } = state['features/base/conference'];
|
||||||
|
|
||||||
// XXX The CalleeInfo is to be displayed/visible as soon as possible
|
// 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
|
// However, the CallDialog is not to be displayed/visible again
|
||||||
// after all remote participants leave.
|
// after all remote participants leave.
|
||||||
if (calleeInfoVisible
|
if (calleeInfoVisible
|
||||||
&& stateFeaturesJWT.calleeInfoVisible === false) {
|
&& stateFeaturesBaseJWT.calleeInfoVisible === false) {
|
||||||
calleeInfoVisible = false;
|
calleeInfoVisible = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -31,9 +31,8 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||||
*/
|
*/
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
/**
|
/**
|
||||||
* The details is an object containing more information
|
* The details is an object containing more information about the
|
||||||
* about the connection failed(shard changes, was the computer
|
* connection failed (shard changes, was the computer suspended, etc.)
|
||||||
* suspended, etc.).
|
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
* @type {object}
|
* @type {object}
|
||||||
|
@ -86,8 +85,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||||
(connectionError && isFatalJitsiConnectionError(connectionError))
|
(connectionError && isFatalJitsiConnectionError(connectionError))
|
||||||
|| (conferenceError
|
|| (conferenceError
|
||||||
&& isFatalJitsiConferenceError(conferenceError))
|
&& isFatalJitsiConferenceError(conferenceError))
|
||||||
|| configError
|
|| configError);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_interval: ?number
|
_interval: ?number
|
||||||
|
@ -173,16 +171,17 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||||
// FIXME: We should dispatch action for this.
|
// FIXME: We should dispatch action for this.
|
||||||
if (typeof APP !== 'undefined') {
|
if (typeof APP !== 'undefined') {
|
||||||
if (APP.conference && APP.conference._room) {
|
if (APP.conference && APP.conference._room) {
|
||||||
APP.conference._room.sendApplicationLog(JSON.stringify(
|
APP.conference._room.sendApplicationLog(JSON.stringify({
|
||||||
{
|
name: 'page.reload',
|
||||||
name: 'page.reload',
|
label: this.props.reason
|
||||||
label: this.props.reason
|
}));
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendAnalytics(createPageReloadScheduledEvent(
|
sendAnalytics(createPageReloadScheduledEvent(
|
||||||
this.props.reason, this.state.timeoutSeconds, this.props.details));
|
this.props.reason,
|
||||||
|
this.state.timeoutSeconds,
|
||||||
|
this.props.details));
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
`The conference will be reloaded after ${
|
`The conference will be reloaded after ${
|
||||||
|
@ -268,19 +267,19 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||||
* @param {Object} state - The redux state.
|
* @param {Object} state - The redux state.
|
||||||
* @protected
|
* @protected
|
||||||
* @returns {{
|
* @returns {{
|
||||||
|
* details: Object,
|
||||||
* isNetworkFailure: boolean,
|
* isNetworkFailure: boolean,
|
||||||
* reason: string,
|
* reason: string
|
||||||
* details: Object
|
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
export function abstractMapStateToProps(state: Object) {
|
export function abstractMapStateToProps(state: Object) {
|
||||||
const conferenceError = state['features/base/conference'].error;
|
const { error: conferenceError } = state['features/base/conference'];
|
||||||
const configError = state['features/base/config'].error;
|
const { error: configError } = state['features/base/config'];
|
||||||
const connectionError = state['features/base/connection'].error;
|
const { error: connectionError } = state['features/base/connection'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
details: connectionError ? connectionError.details : undefined,
|
||||||
isNetworkFailure: Boolean(configError || connectionError),
|
isNetworkFailure: Boolean(configError || connectionError),
|
||||||
reason: (configError || connectionError || conferenceError).message,
|
reason: (configError || connectionError || conferenceError).message
|
||||||
details: connectionError ? connectionError.details : undefined
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue