From c2e5e251aa6f98c3885f326301462472597ef9ef Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 1 Dec 2023 23:37:23 +0100 Subject: [PATCH] Correctly return download status with query It always returned the first emitted status and not the latest one --- .../kotlin/suwayomi/tachidesk/graphql/queries/DownloadQuery.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/DownloadQuery.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/DownloadQuery.kt index f799a09730..3e893cfd3d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/DownloadQuery.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/DownloadQuery.kt @@ -1,6 +1,5 @@ package suwayomi.tachidesk.graphql.queries -import kotlinx.coroutines.flow.first import suwayomi.tachidesk.graphql.types.DownloadStatus import suwayomi.tachidesk.manga.impl.download.DownloadManager import suwayomi.tachidesk.server.JavalinSetup.future @@ -9,7 +8,7 @@ import java.util.concurrent.CompletableFuture class DownloadQuery { fun downloadStatus(): CompletableFuture { return future { - DownloadStatus(DownloadManager.status.first()) + DownloadStatus(DownloadManager.getStatus()) } } }