From a272bed57a820aab8851a4b0dca7a2b7fd4ab62a Mon Sep 17 00:00:00 2001 From: NguyenTranHoangSym Date: Thu, 19 Oct 2023 16:07:21 +0700 Subject: [PATCH] SDA-4373: Reopen SDA automatically after save --- src/app/config-handler.ts | 2 ++ src/app/window-handler.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/config-handler.ts b/src/app/config-handler.ts index 6abd1af0..40d8aa01 100644 --- a/src/app/config-handler.ts +++ b/src/app/config-handler.ts @@ -15,6 +15,7 @@ import { SDAEndReasonTypes, SDAUserSessionActionTypes, } from './bi/interface'; +import { terminateC9Shell } from './c9-shell-handler'; import { appStats } from './stats'; const writeFile = util.promisify(fs.writeFile); @@ -235,6 +236,7 @@ class Config { app.on('before-quit', async (event) => { const id = powerSaveBlocker.start('prevent-app-suspension'); logger.info('config-handler: before-quit application is terminated'); + terminateC9Shell(); if (!this.didUpdateConfigFile) { this.isUpdatingConfigFile = true; event.preventDefault(); diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 7022806b..0cfb6e84 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -2343,7 +2343,7 @@ export class WindowHandler { if (shouldRelaunch) { app.relaunch(); } - app.exit(); + app.quit(); }; /**