We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f5e017 commit 552d2b5Copy full SHA for 552d2b5
app/src/main/java/org/wikipedia/notifications/PollNotificationWorker.kt
@@ -63,11 +63,8 @@ class PollNotificationWorker(
63
64
companion object {
65
fun schedulePollNotificationJob(context: Context) {
66
- val constraints = Constraints.Builder()
67
- .setRequiredNetworkType(NetworkType.CONNECTED)
68
- .build()
69
val workRequest = OneTimeWorkRequestBuilder<PollNotificationWorker>()
70
- .setConstraints(constraints)
+ .setConstraints(Constraints(NetworkType.CONNECTED))
71
.build()
72
WorkManager.getInstance(context).enqueue(workRequest)
73
}
0 commit comments