From bd0a05e0fdeb575ccf4207d8ab8de8ccfd0271ac Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sun, 12 Jun 2022 22:59:56 +0200 Subject: [PATCH] same if for validation process, and temporary finish event for validation process --- src/main/services/bs-installer.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/services/bs-installer.service.ts b/src/main/services/bs-installer.service.ts index ee87840f..9e49bd98 100644 --- a/src/main/services/bs-installer.service.ts +++ b/src/main/services/bs-installer.service.ts @@ -107,10 +107,10 @@ export class BSInstallerService{ else if(out[0] === DownloadEventType.TWO_FA_CODE){ this.utils.ipcSend(`bs-download.${DownloadEventType.GUARD_CODE}`); } - else if(out[0] === DownloadEventType.PROGESS){ + else if(out[0] === DownloadEventType.PROGESS || (out[0] === DownloadEventType.VALIDATION && parseFloat(out[1]) < 100)){ this.utils.ipcSend(`bs-download.${DownloadEventType.PROGESS}`, parseFloat(out[1])); } - else if(out[0] === DownloadEventType.FINISH){ + else if(out[0] === DownloadEventType.FINISH || (out[0] === DownloadEventType.VALIDATION && parseFloat(out[1]) == 100)){ this.utils.ipcSend(`bs-download.${DownloadEventType.FINISH}`); this.downloadProcess.kill(); } else if(out[0] === DownloadEventType.ERROR){ @@ -157,6 +157,7 @@ export enum DownloadEventType{ GUARD_CODE = "[Guard]", TWO_FA_CODE = "[2FA]", PROGESS = "[Progress]", + VALIDATION = "[Validated]", FINISH = "[Finished]", ALREADY_DOAWNLOADING = "[AlreadyDownloading]", ERROR = "[Error]",