mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-25 19:41:02 +00:00
fix: add a check for minimum poll time
This commit is contained in:
@@ -10,6 +10,10 @@ import ani.dantotsu.notifications.subscription.SubscriptionNotificationWorker
|
||||
|
||||
class WorkManagerScheduler(private val context: Context) : TaskScheduler {
|
||||
override fun scheduleRepeatingTask(taskType: TaskType, interval: Long) {
|
||||
if (interval < PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS) {
|
||||
cancelTask(taskType)
|
||||
return
|
||||
}
|
||||
val constraints = Constraints.Builder()
|
||||
.setRequiredNetworkType(androidx.work.NetworkType.CONNECTED)
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user