Use @Singleton where possible

This commit is contained in:
Kirill Kamakin
2022-04-03 00:34:29 +05:00
parent 1b97504c7a
commit 915ffa521b
4 changed files with 16 additions and 0 deletions

View File

@@ -23,16 +23,21 @@ import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
interface RecipeModule {
@Binds
@Singleton
fun provideRecipeDataSource(recipeDataSourceImpl: RecipeDataSourceImpl): RecipeDataSource
@Binds
@Singleton
fun provideRecipeStorage(recipeStorageImpl: RecipeStorageImpl): RecipeStorage
@Binds
@Singleton
fun provideRecipeRepo(recipeRepoImpl: RecipeRepoImpl): RecipeRepo
@Binds
@Singleton
fun provideRecipeImageLoader(recipeImageLoaderImpl: RecipeImageLoaderImpl): RecipeImageLoader
companion object {