From 52f4bddbcee2bb72b64099905a9dac1ae5ec5836 Mon Sep 17 00:00:00 2001 From: inorichi Date: Mon, 7 Nov 2016 16:23:04 +0100 Subject: [PATCH] Set flex time --- .../java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt | 3 ++- .../java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt index ed1d6ff25a..d109a6f50a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt @@ -30,9 +30,10 @@ class LibraryUpdateJob : Job() { JobRequest.NetworkType.CONNECTED JobRequest.Builder(TAG) - .setPeriodic(interval * 60 * 60 * 1000L) + .setPeriodic(interval * 60 * 60 * 1000L, 10 * 60 * 1000) .setRequiredNetworkType(wifiRestriction) .setRequiresCharging(acRestriction) + .setRequirementsEnforced(true) .setPersisted(true) .setUpdateCurrent(true) .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt index b8bcf93f61..7f444ea698 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt @@ -45,8 +45,9 @@ class UpdateCheckerJob : Job() { fun setupTask() { JobRequest.Builder(TAG) - .setPeriodic(24 * 60 * 60 * 1000) + .setPeriodic(24 * 60 * 60 * 1000, 60 * 60 * 1000) .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) + .setRequirementsEnforced(true) .setPersisted(true) .setUpdateCurrent(true) .build()