mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-22 12:48:15 +03:00
Fix extension repo crash with TypeReference issue
Fix by @AntsyLich. Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
This commit is contained in:
parent
5111522769
commit
233af962cd
3 changed files with 6 additions and 10 deletions
|
@ -346,7 +346,7 @@ class DomainModule : InjektModule {
|
|||
addSingletonFactory<AnimeExtensionRepoRepository> { 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<MangaExtensionRepoRepository> { 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()) }
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue