From 9f84538b76e9bec2771f8f6f044094b2dceda605 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:58:49 -0300 Subject: [PATCH] fix: cancel download that is not active --- src/main/services/download/download-manager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/services/download/download-manager.ts b/src/main/services/download/download-manager.ts index e6020cbc..29b117fd 100644 --- a/src/main/services/download/download-manager.ts +++ b/src/main/services/download/download-manager.ts @@ -222,7 +222,9 @@ export class DownloadManager { WindowManager.mainWindow?.setProgressBar(-1); - this.downloadingGameId = null; + if (gameId === this.downloadingGameId) { + this.downloadingGameId = null; + } } static async resumeSeeding(game: Game) {