mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-4715 - Updates the in memory config data (#2226)
This commit is contained in:
parent
632265c6ec
commit
09d2f8dccf
@ -131,6 +131,21 @@ export const IS_NODE_INTEGRATION_ENABLED: boolean = false;
|
||||
export const AUX_CLICK = 'Auxclick';
|
||||
// Timeout on restarting SDA in case it's stuck
|
||||
const LISTEN_TIMEOUT: number = 25 * 1000;
|
||||
const REQUIRED_CONFIG_FIELDS = [
|
||||
'isCustomTitleBar',
|
||||
'mainWinPos',
|
||||
'minimizeOnClose',
|
||||
'notificationSettings',
|
||||
'alwaysOnTop',
|
||||
'locale',
|
||||
'customFlags',
|
||||
'clientSwitch',
|
||||
'enableRendererLogs',
|
||||
'enableBrowserLogin',
|
||||
'browserLoginAutoConnect',
|
||||
'devToolsEnabled',
|
||||
];
|
||||
|
||||
export class WindowHandler {
|
||||
/**
|
||||
* Verifies if the url is valid and
|
||||
@ -243,20 +258,7 @@ export class WindowHandler {
|
||||
*/
|
||||
public async createApplication() {
|
||||
// Use these variables only on initial setup
|
||||
this.config = config.getConfigFields([
|
||||
'isCustomTitleBar',
|
||||
'mainWinPos',
|
||||
'minimizeOnClose',
|
||||
'notificationSettings',
|
||||
'alwaysOnTop',
|
||||
'locale',
|
||||
'customFlags',
|
||||
'clientSwitch',
|
||||
'enableRendererLogs',
|
||||
'enableBrowserLogin',
|
||||
'browserLoginAutoConnect',
|
||||
'devToolsEnabled',
|
||||
]);
|
||||
this.config = config.getConfigFields(REQUIRED_CONFIG_FIELDS);
|
||||
logger.info(
|
||||
`window-handler: main windows initialized with following config data`,
|
||||
this.config,
|
||||
@ -964,6 +966,13 @@ export class WindowHandler {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the required configuration fields from the `config` module.
|
||||
*/
|
||||
public fetchConfigFields = () => {
|
||||
this.config = config.getConfigFields(REQUIRED_CONFIG_FIELDS);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the main window
|
||||
*/
|
||||
|
@ -1289,6 +1289,8 @@ export const updateFeaturesForCloudConfig = async (
|
||||
clearInterval(autoUpdateIntervalId);
|
||||
}
|
||||
}
|
||||
// Refreshes the in-memory window handler's config
|
||||
windowHandler.fetchConfigFields();
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user