mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
There is a race condition in the root navigatior's initialization.
It's possible that it's initialized a touch too late and SDK users who
try to navigate to a conference end up stuck in the connecting screen
because the navigator is null.
This PR waits for it to be initilized by very unorthodox means, it's a
horrible hack which we need to undo, but for that we need to break
appart the inheritance relationship between App.{web,native},
AbstractApp and BaseApp because it's very inflexible.
The flags are now initialized very early so the naviggator sees if the
welcome page is enabled or not.
23 lines
641 B
JavaScript
23 lines
641 B
JavaScript
import { ReducerRegistry } from '../base/redux';
|
|
import { _ROOT_NAVIGATION_READY } from '../mobile/navigation/actionTypes';
|
|
|
|
/**
|
|
* Listen for actions which changes the state of the app feature.
|
|
*
|
|
* @param {Object} state - The Redux state of the feature features/app.
|
|
* @param {Object} action - Action object.
|
|
* @param {string} action.type - Type of action.
|
|
* @returns {Object}
|
|
*/
|
|
ReducerRegistry.register('features/app', (state = {}, action) => {
|
|
switch (action.type) {
|
|
case _ROOT_NAVIGATION_READY:
|
|
return {
|
|
...state,
|
|
ready: action.ready
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
});
|