mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 04:37:25 +01:00
Fix extension repo crash with TypeReference issue (#574)
Fix by @AntsyLich. Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
parent
da20d00481
commit
05071b4205
@ -181,7 +181,7 @@ class DomainModule : InjektModule {
|
||||
addSingletonFactory<ExtensionRepoRepository> { ExtensionRepoRepositoryImpl(get()) }
|
||||
addFactory { GetExtensionRepo(get()) }
|
||||
addFactory { GetExtensionRepoCount(get()) }
|
||||
addFactory { CreateExtensionRepo(get()) }
|
||||
addFactory { CreateExtensionRepo(get(), get()) }
|
||||
addFactory { DeleteExtensionRepo(get()) }
|
||||
addFactory { ReplaceExtensionRepo(get()) }
|
||||
addFactory { UpdateExtensionRepo(get(), get()) }
|
||||
|
@ -8,17 +8,15 @@ import mihon.domain.extensionrepo.repository.ExtensionRepoRepository
|
||||
import mihon.domain.extensionrepo.service.ExtensionRepoService
|
||||
import okhttp3.OkHttpClient
|
||||
import tachiyomi.core.common.util.system.logcat
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class CreateExtensionRepo(
|
||||
private val extensionRepoRepository: ExtensionRepoRepository,
|
||||
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 New Issue
Block a user