From bca49d3cc01099c2413f0b5521604c4f47be639b Mon Sep 17 00:00:00 2001 From: lisonge Date: Wed, 7 Aug 2024 21:14:12 +0800 Subject: [PATCH] perf: upload job --- app/src/main/kotlin/li/songe/gkd/ui/component/UploadOptions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/li/songe/gkd/ui/component/UploadOptions.kt b/app/src/main/kotlin/li/songe/gkd/ui/component/UploadOptions.kt index ea7f1f9..626b4e3 100644 --- a/app/src/main/kotlin/li/songe/gkd/ui/component/UploadOptions.kt +++ b/app/src/main/kotlin/li/songe/gkd/ui/component/UploadOptions.kt @@ -66,7 +66,7 @@ class UploadOptions( } fun startTask(file: File) { - if (job == null && statusFlow.value is LoadStatus.Loading) { + if (job != null || statusFlow.value is LoadStatus.Loading) { return } job = buildTask(file)