Guest User

Untitled

a guest
Mar 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class MainPresenter(private val mainInteractor: MainInteractor) {
  2.  
  3. private val compositeDisposable = CompositeDisposable()
  4.  
  5. fun bind(mainView: MainView) {
  6.  
  7. ...
  8.  
  9. compositeDisposable.add(
  10. mergedIntentsObservable.scan(MainViewState(), this::reduce).subscribe { mainView.render(it) }
  11. )
  12. }
  13.  
  14. fun unbind() {
  15. compositeDisposable.clear()
  16. }
Add Comment
Please, Sign In to add comment