浏览代码

Retry LibraryUpdateJob later if Wi-Fi condition not met

arkon 1 年之前
父节点
当前提交
88e9fefa59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt

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

@@ -111,7 +111,7 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
             val preferences = Injekt.get<LibraryPreferences>()
             val restrictions = preferences.libraryUpdateDeviceRestriction().get()
             if ((DEVICE_ONLY_ON_WIFI in restrictions) && !context.isConnectedToWifi()) {
-                return Result.failure()
+                return Result.retry()
             }
 
             // Find a running manual worker. If exists, try again later