mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
Added check to prevent multiple uploads starting at once
This commit is contained in:
parent
34930f1fea
commit
9a4e87b4d4
1 changed files with 5 additions and 1 deletions
|
|
@ -173,7 +173,11 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) :
|
|||
)!!
|
||||
withContext(Dispatchers.IO) {
|
||||
while (contributionDao.getContribution(statesToProcess)
|
||||
.blockingGet().size > 0
|
||||
.blockingGet().size > 0 && contributionDao.getContribution(
|
||||
arrayListOf(
|
||||
Contribution.STATE_IN_PROGRESS
|
||||
)
|
||||
).blockingGet().size == 0
|
||||
) {
|
||||
/*
|
||||
queuedContributions receives the results from a one-shot query.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue