Skip to content

Commit

Permalink
Fix extension repo crash with TypeReference issue (#574)
Browse files Browse the repository at this point in the history
Fix by @AntsyLich.

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
  • Loading branch information
MajorTanya and AntsyLich authored Mar 23, 2024
1 parent da20d00 commit 05071b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/eu/kanade/domain/DomainModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 05071b4

Please sign in to comment.