Skip to content

Commit

Permalink
Correctly return download status with query
Browse files Browse the repository at this point in the history
It always returned the first emitted status and not the latest one
  • Loading branch information
schroda committed Dec 1, 2023
1 parent 2715dec commit c2e5e25
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,7 +8,7 @@ import java.util.concurrent.CompletableFuture
class DownloadQuery {
fun downloadStatus(): CompletableFuture<DownloadStatus> {
return future {
DownloadStatus(DownloadManager.status.first())
DownloadStatus(DownloadManager.getStatus())
}
}
}

0 comments on commit c2e5e25

Please sign in to comment.