SDA-2731: remove logic of deleting app cache on first install (#1128)

This commit is contained in:
Vishwas Shashidhar 2020-12-01 18:05:04 +05:30 committed by GitHub
parent fe6efc9a9a
commit 4d155d13c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ import * as shellPath from 'shell-path';
import { isDevEnv, isElectronQA, isLinux, isMac } from '../common/env';
import { logger } from '../common/logger';
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 { setChromeFlags, setSessionProperties } from './chrome-flags';
import { config } from './config-handler';
@ -66,19 +66,6 @@ if (!isDevEnv) {
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
*/
@ -86,7 +73,6 @@ let oneStart = false;
const startApplication = async () => {
if (config.isFirstTimeLaunch()) {
logger.info(`main: This is a first time launch! will update config and handle auto launch`);
cleanAppCacheOnInstall();
await config.setUpFirstTimeLaunch();
if (!isLinux) {
await autoLaunchInstance.handleAutoLaunch();
@ -104,7 +90,6 @@ const startApplication = async () => {
await config.updateUserConfigOnStart();
setSessionProperties();
await windowHandler.createApplication();
restartOnFirstInstall();
logger.info(`main: created application`);
};