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