Restore remote config before connecting to server
This commit is contained in:
parent
abcf392e55
commit
7a9e51f5ad
2 changed files with 7 additions and 1 deletions
|
@ -57,8 +57,12 @@ type ConfigListenersMapType = {
|
|||
let config: ConfigMapType = {};
|
||||
const listeners: ConfigListenersMapType = {};
|
||||
|
||||
export async function initRemoteConfig(server: WebAPIType): Promise<void> {
|
||||
export function restoreRemoteConfigFromStorage(): void {
|
||||
config = window.storage.get('remoteConfig') || {};
|
||||
}
|
||||
|
||||
export async function initRemoteConfig(server: WebAPIType): Promise<void> {
|
||||
restoreRemoteConfigFromStorage();
|
||||
await maybeRefreshRemoteConfig(server);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue