Commit caf9ff18 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

thread fixes

parent f7c49ad2
...@@ -30,6 +30,7 @@ import dagger.Component ...@@ -30,6 +30,7 @@ import dagger.Component
import dagger.Module import dagger.Module
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
...@@ -96,6 +97,7 @@ class StartPlansDownloadingDialogController : Controller { ...@@ -96,6 +97,7 @@ class StartPlansDownloadingDialogController : Controller {
detachDisposable.add( detachDisposable.add(
interactor.fetchPlanTypesSizes() interactor.fetchPlanTypesSizes()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe ({ .subscribe ({
view.findViewById<MaterialTextView>(R.id.all_tours_size_textView) view.findViewById<MaterialTextView>(R.id.all_tours_size_textView)
......
...@@ -91,6 +91,7 @@ class StartToursDownloadingDialogController : Controller { ...@@ -91,6 +91,7 @@ class StartToursDownloadingDialogController : Controller {
detachDisposable.add( detachDisposable.add(
downloader.fetchToursSizes() downloader.fetchToursSizes()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
view.findViewById<MaterialTextView>(R.id.all_tours_size_textView) view.findViewById<MaterialTextView>(R.id.all_tours_size_textView)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment