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
@@ -21,7 +21,6 @@ import kotlinx.android.synthetic.main.item_pager_reader.*
import rx.Observable
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
import rx.subjects.PublishSubject
import rx.subjects.SerializedSubject
import java.io.File
@@ -168,7 +167,7 @@ class PagerReaderFragment : BaseFragment() {
val currentValue = AtomicInteger(-1)
progressSubscription?.unsubscribe()
progressSubscription = Observable.interval(100, TimeUnit.MILLISECONDS, Schedulers.newThread())
progressSubscription = Observable.interval(100, TimeUnit.MILLISECONDS)
.onBackpressureLatest()
.observeOn(AndroidSchedulers.mainThread())
.subscribe {