Conversation
| @Provides | ||
| @Singleton | ||
| Cache provideOkHttpCache(Application application) { | ||
| int cacheSize = 5 * 1024 * 1024; |
There was a problem hiding this comment.
@AFGhazy extract this to a final constant
|
|
||
| ((BaseApp) getActivity().getApplication()).getNetworkComponent().inject(this); | ||
|
|
||
| setPresenter(NewTodoPresenter.getInstance(mTodosSubscriber, this)); |
There was a problem hiding this comment.
@AFGhazy this should be handled by DI, add @Inject to the presenter do the necessary changes (add @ provide .. etc) and remove this line.
IslamSalah
left a comment
There was a problem hiding this comment.
@AFGhazy +1 For the clean easy to review PR. Keep it up
| @Module | ||
| public class NetworkModule { | ||
| @Provides | ||
| @Named("api_url") |
There was a problem hiding this comment.
@AFGhazy I believe @Named("api_url") is redundant and can be removed. What do you think?
|
|
||
| @Provides | ||
| @Singleton | ||
| @Named("rxjava2_call_adapter") |
There was a problem hiding this comment.
@AFGhazy I believe @Named("rxjava2_call_adapter") is redundant and can be removed. What do you think?
| @Provides | ||
| @Singleton | ||
| @Named("non_cached") | ||
| OkHttpClient provideOkHttpClientNonCached() { |
There was a problem hiding this comment.
@AFGhazy I believe this method is never used. If so we can remove it and remove @Named("cached") as well. Kindly let me know if I missed something.
No description provided.