Remove newThread usages, it probably fixes random crashes

This commit is contained in:
len
2016-07-08 18:23:03 +02:00
parent f15df40a54
commit 5f1a89df63
4 changed files with 8 additions and 7 deletions
@@ -14,7 +14,6 @@ import nucleus.factory.RequiresPresenter
import rx.Observable
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
import rx.subscriptions.CompositeSubscription
import java.util.*
import java.util.concurrent.TimeUnit
@@ -179,7 +178,7 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
* @param download the download to observe its progress.
*/
private fun observeProgress(download: Download) {
val subscription = Observable.interval(50, TimeUnit.MILLISECONDS, Schedulers.newThread())
val subscription = Observable.interval(50, TimeUnit.MILLISECONDS)
// Get the sum of percentages for all the pages.
.flatMap {
Observable.from(download.pages)