app: avoid loading config when going back to the welcome page
This commit is contained in:
parent
a4cf79c161
commit
a2f8e156da
|
@ -81,6 +81,12 @@ export function appNavigate(uri: ?string) {
|
||||||
|
|
||||||
let config;
|
let config;
|
||||||
|
|
||||||
|
// Avoid (re)loading the config when there is no room.
|
||||||
|
if (!room) {
|
||||||
|
config = restoreConfig(baseURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!config) {
|
||||||
try {
|
try {
|
||||||
config = await loadConfig(url);
|
config = await loadConfig(url);
|
||||||
dispatch(storeConfig(baseURL, config));
|
dispatch(storeConfig(baseURL, config));
|
||||||
|
@ -93,6 +99,7 @@ export function appNavigate(uri: ?string) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (getState()['features/base/config'].locationURL !== locationURL) {
|
if (getState()['features/base/config'].locationURL !== locationURL) {
|
||||||
dispatch(loadConfigError(new Error('Config no longer needed!'), locationURL));
|
dispatch(loadConfigError(new Error('Config no longer needed!'), locationURL));
|
||||||
|
|
Loading…
Reference in New Issue