[RN] Handle config loading errors
They will be stored in redux and the PageReloadOverlay will be displayed. Note that this commit also introduces a subtle (and yet important!) change: the location URL is now always set, regardless of the configuration loading or not. This is needed in order for the retry logic to pick it up.
This commit is contained in:
committed by
Lyubo Marinov
parent
87a87eebb9
commit
c05c8e0f1e
@@ -66,12 +66,14 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||
*/
|
||||
static needsRender(state) {
|
||||
const conferenceError = state['features/base/conference'].error;
|
||||
const configError = state['features/base/config'].error;
|
||||
const connectionError = state['features/base/connection'].error;
|
||||
|
||||
return (
|
||||
(connectionError && isFatalJitsiConnectionError(connectionError))
|
||||
|| (conferenceError
|
||||
&& isFatalJitsiConferenceError(conferenceError))
|
||||
|| configError
|
||||
);
|
||||
}
|
||||
|
||||
@@ -253,10 +255,11 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
|
||||
*/
|
||||
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;
|
||||
|
||||
return {
|
||||
isNetworkFailure: Boolean(connectionError),
|
||||
reason: (connectionError || conferenceError).message
|
||||
isNetworkFailure: Boolean(configError || connectionError),
|
||||
reason: (configError || connectionError || conferenceError).message
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user