Преглед изворни кода

Return job failure if library update actually doesn't start

arkon пре 4 година
родитељ
комит
772929b5c6

+ 5 - 2
app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt

@@ -17,8 +17,11 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
     Worker(context, workerParams) {
 
     override fun doWork(): Result {
-        LibraryUpdateService.start(context)
-        return Result.success()
+        return if (LibraryUpdateService.start(context)) {
+            Result.success()
+        } else {
+            Result.failure()
+        }
     }
 
     companion object {