Complete RxBindings to FlowBinding migration
(cherry picked from commit 3d10dad780d7d9c1a1b9c5fa634efe710183845b)
This commit is contained in:
parent
e46dd808e7
commit
1916751f4f
@ -5,13 +5,15 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.jakewharton.rxbinding.view.clicks
|
|
||||||
import eu.kanade.tachiyomi.databinding.EhFragmentBatchAddBinding
|
import eu.kanade.tachiyomi.databinding.EhFragmentBatchAddBinding
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||||
import eu.kanade.tachiyomi.util.lang.combineLatest
|
import eu.kanade.tachiyomi.util.lang.combineLatest
|
||||||
|
import eu.kanade.tachiyomi.util.lang.launchInUI
|
||||||
import eu.kanade.tachiyomi.util.lang.plusAssign
|
import eu.kanade.tachiyomi.util.lang.plusAssign
|
||||||
import kotlinx.android.synthetic.main.eh_fragment_batch_add.view.galleries_box
|
import kotlinx.android.synthetic.main.eh_fragment_batch_add.view.galleries_box
|
||||||
import kotlinx.android.synthetic.main.eh_fragment_batch_add.view.progress_log
|
import kotlinx.android.synthetic.main.eh_fragment_batch_add.view.progress_log
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
|
import reactivecircus.flowbinding.android.view.clicks
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
import rx.subscriptions.CompositeSubscription
|
import rx.subscriptions.CompositeSubscription
|
||||||
|
|
||||||
@ -32,13 +34,17 @@ class BatchAddController : NucleusController<EhFragmentBatchAddBinding, BatchAdd
|
|||||||
super.onViewCreated(view)
|
super.onViewCreated(view)
|
||||||
|
|
||||||
with(view) {
|
with(view) {
|
||||||
binding.btnAddGalleries.clicks().subscribeUntilDestroy {
|
binding.btnAddGalleries.clicks()
|
||||||
addGalleries(binding.galleriesBox.text.toString())
|
.onEach {
|
||||||
}
|
addGalleries(binding.galleriesBox.text.toString())
|
||||||
|
}
|
||||||
|
.launchInUI()
|
||||||
|
|
||||||
binding.progressDismissBtn.clicks().subscribeUntilDestroy {
|
binding.progressDismissBtn.clicks()
|
||||||
presenter.currentlyAddingRelay.call(BatchAddPresenter.STATE_PROGRESS_TO_INPUT)
|
.onEach {
|
||||||
}
|
presenter.currentlyAddingRelay.call(BatchAddPresenter.STATE_PROGRESS_TO_INPUT)
|
||||||
|
}
|
||||||
|
.launchInUI()
|
||||||
|
|
||||||
val progressSubscriptions = CompositeSubscription()
|
val progressSubscriptions = CompositeSubscription()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user