Closed ZianeA closed 3 years ago
Thanks for the PR @ZianeA! And congrats for opening our first PR on the project ✨ We'll review it asap
However, one thing to note is that the ImagesStorage from DI is never used.
That's true — we plan to eventually use it, but we need to keep in mind it's not used yet :) Maybe we can get rid of it in the future, instead; let's see.
I annotated the
provideDatabase
method with@Singleton
annotation to avoid creating a new database instance for every injection. I also marked theDataRepository
with@Singleton
for similar reasons. AlthoughDatabaseModule
is installed in a singleton component, you still have to scope its bindings. See the following for more info: https://dagger.dev/hilt/componentsI replaced the provide method with constructor injection to bind the
DiskImagesStorage
. However, one thing to note is that the ImagesStorage from DI is never used.