Skip to content

Commit

Permalink
Unique workers
Browse files Browse the repository at this point in the history
  • Loading branch information
premnirmal committed May 22, 2023
1 parent 0fecc3f commit 9ad41c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.core.content.getSystemService
import androidx.work.BackoffPolicy.LINEAR
import androidx.work.Constraints
import androidx.work.ExistingPeriodicWorkPolicy.REPLACE
import androidx.work.ExistingWorkPolicy
import androidx.work.NetworkType.CONNECTED
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.PeriodicWorkRequestBuilder
Expand Down Expand Up @@ -147,7 +148,7 @@ class AlarmScheduler @Inject constructor(
.setBackoffCriteria(LINEAR, 1L, MINUTES)
.setConstraints(constraints)
.build()
workManager.enqueue(request)
workManager.enqueueUniqueWork(RefreshWorker.TAG, ExistingWorkPolicy.REPLACE, request)
return nextAlarmDate
}

Expand Down
4 changes: 2 additions & 2 deletions app/version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# this file is purely for f-droid because it cannot infer the version name/code from the git tag
versionName=3.9.822
versionCode=300900822
versionName=3.9.823
versionCode=300900823

0 comments on commit 9ad41c6

Please sign in to comment.