Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MainPresenter(private val mainInteractor: MainInteractor) {
- private val compositeDisposable = CompositeDisposable()
- fun bind(mainView: MainView) {
- ...
- compositeDisposable.add(
- mergedIntentsObservable.scan(MainViewState(), this::reduce).subscribe { mainView.render(it) }
- )
- }
- fun unbind() {
- compositeDisposable.clear()
- }
Add Comment
Please, Sign In to add comment