mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-2731: remove logic of deleting app cache on first install (#1128)
This commit is contained in:
parent
fe6efc9a9a
commit
4d155d13c9
@ -5,7 +5,7 @@ import * as shellPath from 'shell-path';
|
|||||||
import { isDevEnv, isElectronQA, isLinux, isMac } from '../common/env';
|
import { isDevEnv, isElectronQA, isLinux, isMac } from '../common/env';
|
||||||
import { logger } from '../common/logger';
|
import { logger } from '../common/logger';
|
||||||
import { getCommandLineArgs } from '../common/utils';
|
import { getCommandLineArgs } from '../common/utils';
|
||||||
import { cleanAppCacheOnInstall, cleanUpAppCache, createAppCacheFile } from './app-cache-handler';
|
import { cleanUpAppCache, createAppCacheFile } from './app-cache-handler';
|
||||||
import { autoLaunchInstance } from './auto-launch-controller';
|
import { autoLaunchInstance } from './auto-launch-controller';
|
||||||
import { setChromeFlags, setSessionProperties } from './chrome-flags';
|
import { setChromeFlags, setSessionProperties } from './chrome-flags';
|
||||||
import { config } from './config-handler';
|
import { config } from './config-handler';
|
||||||
@ -66,19 +66,6 @@ if (!isDevEnv) {
|
|||||||
app.setAsDefaultProtocolClient('symphony');
|
app.setAsDefaultProtocolClient('symphony');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Restarts the app in case of network issues
|
|
||||||
*/
|
|
||||||
const restartOnFirstInstall = async (): Promise<void> => {
|
|
||||||
const bootCount = config.getBootCount();
|
|
||||||
if (bootCount !== undefined && bootCount === 1) {
|
|
||||||
logger.warn(`Boot count fits the criteria of equal to 1, restarting the app`);
|
|
||||||
app.relaunch();
|
|
||||||
app.quit();
|
|
||||||
}
|
|
||||||
logger.warn(`Boot count does not fit the criteria of lesser than or equal to 1, not restarting the app`);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function that initialises the application
|
* Main function that initialises the application
|
||||||
*/
|
*/
|
||||||
@ -86,7 +73,6 @@ let oneStart = false;
|
|||||||
const startApplication = async () => {
|
const startApplication = async () => {
|
||||||
if (config.isFirstTimeLaunch()) {
|
if (config.isFirstTimeLaunch()) {
|
||||||
logger.info(`main: This is a first time launch! will update config and handle auto launch`);
|
logger.info(`main: This is a first time launch! will update config and handle auto launch`);
|
||||||
cleanAppCacheOnInstall();
|
|
||||||
await config.setUpFirstTimeLaunch();
|
await config.setUpFirstTimeLaunch();
|
||||||
if (!isLinux) {
|
if (!isLinux) {
|
||||||
await autoLaunchInstance.handleAutoLaunch();
|
await autoLaunchInstance.handleAutoLaunch();
|
||||||
@ -104,7 +90,6 @@ const startApplication = async () => {
|
|||||||
await config.updateUserConfigOnStart();
|
await config.updateUserConfigOnStart();
|
||||||
setSessionProperties();
|
setSessionProperties();
|
||||||
await windowHandler.createApplication();
|
await windowHandler.createApplication();
|
||||||
restartOnFirstInstall();
|
|
||||||
logger.info(`main: created application`);
|
logger.info(`main: created application`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user