From 5d8e4d7311261d80d55ba71628a80c499279b3c2 Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Sat, 8 Apr 2023 15:55:00 -0600 Subject: [PATCH] Fix download buttons getting stuck --- src/utils/download.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/download.ts b/src/utils/download.ts index 1c47ff4..75c50b8 100644 --- a/src/utils/download.ts +++ b/src/utils/download.ts @@ -101,25 +101,25 @@ export default class DownloadHandler { downloadingJar() { // Kinda hacky but it works - return this.downloads.some((d) => d.path.includes('grasscutter.zip')) + return this.downloads.some((d) => d.path.includes('grasscutter.zip') && (d.status != ('finished' || 'error'))) } downloadingFullBuild() { // Kinda hacky but it works - return this.downloads.some((d) => d.path.includes('GrasscutterCulti')) + return this.downloads.some((d) => d.path.includes('GrasscutterCulti') && (d.status != ('finished' || 'error'))) } downloadingResources() { // Kinda hacky but it works - return this.downloads.some((d) => d.path.includes('resources')) + return this.downloads.some((d) => d.path.includes('resources') && (d.status != ('finished' || 'error'))) } downloadingRepo() { - return this.downloads.some((d) => d.path.includes('grasscutter_repo.zip')) + return this.downloads.some((d) => d.path.includes('grasscutter_repo.zip') && (d.status != ('finished' || 'error'))) } downloadingMigoto() { - return this.downloads.some((d) => d.path.includes('3dmigoto')) + return this.downloads.some((d) => d.path.includes('3dmigoto') && (d.status != ('finished' || 'error'))) } addDownload(url: string, path: string, onFinish?: () => void) {