Set maxProgress to correct value
This commit is contained in:
parent
f3d8690f5c
commit
1d88d16545
1 changed files with 2 additions and 2 deletions
|
@ -356,7 +356,7 @@ class OpenHumansUploader @Inject constructor(
|
||||||
if (currentProgress % 1000L == 0L) showOngoingNotification(maxProgress, currentProgress)
|
if (currentProgress % 1000L == 0L) showOngoingNotification(maxProgress, currentProgress)
|
||||||
}
|
}
|
||||||
copyDisposable = Completable.fromCallable { MainApp.getDbHelper().clearOpenHumansQueue() }
|
copyDisposable = Completable.fromCallable { MainApp.getDbHelper().clearOpenHumansQueue() }
|
||||||
.andThen(Single.defer { Single.just(MainApp.getDbHelper().countOfAllRows) })
|
.andThen(Single.defer { Single.just(MainApp.getDbHelper().countOfAllRows + treatmentsPlugin.service.count()) })
|
||||||
.doOnSuccess { maxProgress = it }
|
.doOnSuccess { maxProgress = it }
|
||||||
.flatMapObservable { Observable.defer { Observable.fromIterable(treatmentsPlugin.service.treatmentData) } }
|
.flatMapObservable { Observable.defer { Observable.fromIterable(treatmentsPlugin.service.treatmentData) } }
|
||||||
.map { enqueueTreatment(it); increaseCounter() }
|
.map { enqueueTreatment(it); increaseCounter() }
|
||||||
|
|
Loading…
Reference in a new issue