diff --git a/app/src/main/java/eu/kanade/domain/DomainModule.kt b/app/src/main/java/eu/kanade/domain/DomainModule.kt index 1310f6c03..ea6ee4c72 100644 --- a/app/src/main/java/eu/kanade/domain/DomainModule.kt +++ b/app/src/main/java/eu/kanade/domain/DomainModule.kt @@ -346,7 +346,7 @@ class DomainModule : InjektModule { addSingletonFactory { AnimeExtensionRepoRepositoryImpl(get()) } addFactory { GetAnimeExtensionRepo(get()) } addFactory { GetAnimeExtensionRepoCount(get()) } - addFactory { CreateAnimeExtensionRepo(get()) } + addFactory { CreateAnimeExtensionRepo(get(), get()) } addFactory { DeleteAnimeExtensionRepo(get()) } addFactory { ReplaceAnimeExtensionRepo(get()) } addFactory { UpdateAnimeExtensionRepo(get(), get()) } @@ -354,7 +354,7 @@ class DomainModule : InjektModule { addSingletonFactory { MangaExtensionRepoRepositoryImpl(get()) } addFactory { GetMangaExtensionRepo(get()) } addFactory { GetMangaExtensionRepoCount(get()) } - addFactory { CreateMangaExtensionRepo(get()) } + addFactory { CreateMangaExtensionRepo(get(), get()) } addFactory { DeleteMangaExtensionRepo(get()) } addFactory { ReplaceMangaExtensionRepo(get()) } addFactory { UpdateMangaExtensionRepo(get(), get()) } diff --git a/domain/src/main/java/mihon/domain/extensionrepo/anime/interactor/CreateAnimeExtensionRepo.kt b/domain/src/main/java/mihon/domain/extensionrepo/anime/interactor/CreateAnimeExtensionRepo.kt index 7f9690f8b..480c8989b 100644 --- a/domain/src/main/java/mihon/domain/extensionrepo/anime/interactor/CreateAnimeExtensionRepo.kt +++ b/domain/src/main/java/mihon/domain/extensionrepo/anime/interactor/CreateAnimeExtensionRepo.kt @@ -8,17 +8,15 @@ import mihon.domain.extensionrepo.model.ExtensionRepo import mihon.domain.extensionrepo.service.ExtensionRepoService import okhttp3.OkHttpClient import tachiyomi.core.common.util.system.logcat -import uy.kohesive.injekt.injectLazy class CreateAnimeExtensionRepo( private val extensionRepoRepository: AnimeExtensionRepoRepository, + private val networkHelper: NetworkHelper, ) { private val repoRegex = """^https://.*/index\.min\.json$""".toRegex() - private val networkService: NetworkHelper by injectLazy() - private val client: OkHttpClient - get() = networkService.client + get() = networkHelper.client private val extensionRepoService = ExtensionRepoService(client) diff --git a/domain/src/main/java/mihon/domain/extensionrepo/manga/interactor/CreateMangaExtensionRepo.kt b/domain/src/main/java/mihon/domain/extensionrepo/manga/interactor/CreateMangaExtensionRepo.kt index 5dc3ab0ba..e5887f437 100644 --- a/domain/src/main/java/mihon/domain/extensionrepo/manga/interactor/CreateMangaExtensionRepo.kt +++ b/domain/src/main/java/mihon/domain/extensionrepo/manga/interactor/CreateMangaExtensionRepo.kt @@ -8,17 +8,15 @@ import mihon.domain.extensionrepo.model.ExtensionRepo import mihon.domain.extensionrepo.service.ExtensionRepoService import okhttp3.OkHttpClient import tachiyomi.core.common.util.system.logcat -import uy.kohesive.injekt.injectLazy class CreateMangaExtensionRepo( private val extensionRepoRepository: MangaExtensionRepoRepository, + private val networkHelper: NetworkHelper, ) { private val repoRegex = """^https://.*/index\.min\.json$""".toRegex() - private val networkService: NetworkHelper by injectLazy() - private val client: OkHttpClient - get() = networkService.client + get() = networkHelper.client private val extensionRepoService = ExtensionRepoService(client)