From 865ea40a042c6117a237a24b1128853d7e8ccdb3 Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:07:35 +0200 Subject: [PATCH] hide progress on cancel modal --- src/renderer/services/bs-downloader.service.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/services/bs-downloader.service.ts b/src/renderer/services/bs-downloader.service.ts index 2bcedf55..916cb421 100644 --- a/src/renderer/services/bs-downloader.service.ts +++ b/src/renderer/services/bs-downloader.service.ts @@ -58,7 +58,11 @@ export class BsDownloaderService{ this.ipcService.watch("bs-download.[2FA]").subscribe(async response => { if(!response.success){ this.ipcService.sendLazy("bs-download.kill"); return; } const res = await this.modalService.openModal(ModalType.GUARD_CODE); - if(res.exitCode !== ModalExitCode.COMPLETED){ this.ipcService.sendLazy("bs-download.kill"); return; } + if(res.exitCode !== ModalExitCode.COMPLETED){ + this.progressBarService.hide(true); + this.ipcService.sendLazy("bs-download.kill"); + return; + } this.ipcService.sendLazy('bs-download.[2FA]', {args: res.data}); }); @@ -85,7 +89,10 @@ export class BsDownloaderService{ let promise; if(!this.authService.sessionExist()){ const res = await this.modalService.openModal<{username: string, stay: boolean, password: string}>(ModalType.STEAM_LOGIN); - if(res.exitCode !== ModalExitCode.COMPLETED){ return {success: false}; } + if(res.exitCode !== ModalExitCode.COMPLETED){ + this.progressBarService.hide(true); + return {success: false}; + } this.authService.setSteamSession(res.data.username, res.data.stay); promise = this.ipcService.send('bs-download.start', {args: {bsVersion: bsVersion, username: res.data.username, password: res.data.password, stay: res.data.stay}}); }