-
Notifications
You must be signed in to change notification settings - Fork 25
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
Why is RestAdapter Singleton and not a dependency ? #1
Comments
Hello Pierre, I'm glad that my code helps you. Indeed your aproach is correct. RestAdapter must be in the InteractorModule If I have a free moment this week, I will update the code. Thanks for your time and to report me this. Best regards. 2015-04-27 8:49 GMT+02:00 Pierre Degand notifications@github.com:
|
Hello,
Great article about MVP + Dagger 2 + Retrofit. Helped me a lot.
I just have a question about the RestAdapter. In the current version of the code, the RestAdapter is a self implemented Singleton (with some flaws in the impl tbh) and not a dependency provided by Dagger ?
Why did you choose to do like this and did not put this dependency in the InteractorModule ?
The RestAdapter could be injected in the constructor of the FindItemsInteractorImpl and you will have the behavious properly implemented with Dagger2.
Or maybe i'm missing a point of Dagger and/or Retrofit that prevents you to do such things.
Thank you
The text was updated successfully, but these errors were encountered: