Skip to content

Commit 552d2b5

Browse files
Use Constraints constructor directly
1 parent 0f5e017 commit 552d2b5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/src/main/java/org/wikipedia/notifications/PollNotificationWorker.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,8 @@ class PollNotificationWorker(
6363

6464
companion object {
6565
fun schedulePollNotificationJob(context: Context) {
66-
val constraints = Constraints.Builder()
67-
.setRequiredNetworkType(NetworkType.CONNECTED)
68-
.build()
6966
val workRequest = OneTimeWorkRequestBuilder<PollNotificationWorker>()
70-
.setConstraints(constraints)
67+
.setConstraints(Constraints(NetworkType.CONNECTED))
7168
.build()
7269
WorkManager.getInstance(context).enqueue(workRequest)
7370
}

0 commit comments

Comments
 (0)