Created
March 27, 2018 06:53
-
-
Save Laimiux/fbd3941c3ce7e1bbde8401f2cd94b799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommentFormPresenter(val viewModel: CommentViewModel) { | |
fun attach(view: CommentFormView) { | |
// Don't forget to unsubscribe | |
viewModel.viewStateStream().subscribe { state -> | |
view.setViewState(state) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
viewModel
->viewState
. Also, I'd show the detach method + clearing the disposables as well just to be explicit.