mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05: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
2 changed files with 3 additions and 5 deletions
|
@ -181,7 +181,7 @@ class DomainModule : InjektModule {
|
||||||
addSingletonFactory<ExtensionRepoRepository> { ExtensionRepoRepositoryImpl(get()) }
|
addSingletonFactory<ExtensionRepoRepository> { ExtensionRepoRepositoryImpl(get()) }
|
||||||
addFactory { GetExtensionRepo(get()) }
|
addFactory { GetExtensionRepo(get()) }
|
||||||
addFactory { GetExtensionRepoCount(get()) }
|
addFactory { GetExtensionRepoCount(get()) }
|
||||||
addFactory { CreateExtensionRepo(get()) }
|
addFactory { CreateExtensionRepo(get(), get()) }
|
||||||
addFactory { DeleteExtensionRepo(get()) }
|
addFactory { DeleteExtensionRepo(get()) }
|
||||||
addFactory { ReplaceExtensionRepo(get()) }
|
addFactory { ReplaceExtensionRepo(get()) }
|
||||||
addFactory { UpdateExtensionRepo(get(), get()) }
|
addFactory { UpdateExtensionRepo(get(), get()) }
|
||||||
|
|
|
@ -8,17 +8,15 @@ import mihon.domain.extensionrepo.repository.ExtensionRepoRepository
|
||||||
import mihon.domain.extensionrepo.service.ExtensionRepoService
|
import mihon.domain.extensionrepo.service.ExtensionRepoService
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import tachiyomi.core.common.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import uy.kohesive.injekt.injectLazy
|
|
||||||
|
|
||||||
class CreateExtensionRepo(
|
class CreateExtensionRepo(
|
||||||
private val extensionRepoRepository: ExtensionRepoRepository,
|
private val extensionRepoRepository: ExtensionRepoRepository,
|
||||||
|
private val networkHelper: NetworkHelper,
|
||||||
) {
|
) {
|
||||||
private val repoRegex = """^https://.*/index\.min\.json$""".toRegex()
|
private val repoRegex = """^https://.*/index\.min\.json$""".toRegex()
|
||||||
|
|
||||||
private val networkService: NetworkHelper by injectLazy()
|
|
||||||
|
|
||||||
private val client: OkHttpClient
|
private val client: OkHttpClient
|
||||||
get() = networkService.client
|
get() = networkHelper.client
|
||||||
|
|
||||||
private val extensionRepoService = ExtensionRepoService(client)
|
private val extensionRepoService = ExtensionRepoService(client)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue