-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UseCases not posting to UI by default #35
Comments
Hello, But in the other hand we have a few cases when we can do simple optymalization by delegate work to other thread, for example please take a look at MoviesViewModel class:
This is only my opinion based on my expirience, I have used MVP with RxJava a lot in my projects and in my casses threading was done a moment before subscribing to Observable in Presenter layer. Beacouse Presenter is connection between View <---> Domain, it have all necessary knowledge about which operation should be done on which thread. |
What if a UseCase (interactor) is not meant to post (just) to UI?
Assume we have to add a GetMoviesNames interactor that returns only names. It makes sense that it would use the existing GetMovies interactor and then apply more logic to the result to get the list of names only. How would this be achieved with GetMovies only posting to UI? Is there a way to make posting to UI optional so that UseCases could be consumed by other UseCases in different thread than UI?
The text was updated successfully, but these errors were encountered: