mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-16 17:19:17 +01:00
7261fcccda
* Use Compose in Migrate tab * Add missing header * Remove unused files * Fix build after rebase * Changes from review comments
42 lines
1.8 KiB
Kotlin
42 lines
1.8 KiB
Kotlin
package eu.kanade.domain
|
|
|
|
import eu.kanade.data.history.HistoryRepositoryImpl
|
|
import eu.kanade.data.source.SourceRepositoryImpl
|
|
import eu.kanade.domain.history.interactor.DeleteHistoryTable
|
|
import eu.kanade.domain.history.interactor.GetHistory
|
|
import eu.kanade.domain.history.interactor.GetNextChapterForManga
|
|
import eu.kanade.domain.history.interactor.RemoveHistoryById
|
|
import eu.kanade.domain.history.interactor.RemoveHistoryByMangaId
|
|
import eu.kanade.domain.history.repository.HistoryRepository
|
|
import eu.kanade.domain.source.interactor.DisableSource
|
|
import eu.kanade.domain.source.interactor.GetEnabledSources
|
|
import eu.kanade.domain.source.interactor.GetSourcesWithFavoriteCount
|
|
import eu.kanade.domain.source.interactor.SetMigrateSorting
|
|
import eu.kanade.domain.source.interactor.ToggleSourcePin
|
|
import eu.kanade.domain.source.repository.SourceRepository
|
|
import uy.kohesive.injekt.api.InjektModule
|
|
import uy.kohesive.injekt.api.InjektRegistrar
|
|
import uy.kohesive.injekt.api.addFactory
|
|
import uy.kohesive.injekt.api.addSingletonFactory
|
|
import uy.kohesive.injekt.api.get
|
|
|
|
class DomainModule : InjektModule {
|
|
|
|
override fun InjektRegistrar.registerInjectables() {
|
|
addFactory { GetNextChapterForManga(get()) }
|
|
|
|
addSingletonFactory<HistoryRepository> { HistoryRepositoryImpl(get()) }
|
|
addFactory { DeleteHistoryTable(get()) }
|
|
addFactory { GetHistory(get()) }
|
|
addFactory { RemoveHistoryById(get()) }
|
|
addFactory { RemoveHistoryByMangaId(get()) }
|
|
|
|
addSingletonFactory<SourceRepository> { SourceRepositoryImpl(get(), get()) }
|
|
addFactory { GetEnabledSources(get(), get()) }
|
|
addFactory { DisableSource(get()) }
|
|
addFactory { ToggleSourcePin(get()) }
|
|
addFactory { GetSourcesWithFavoriteCount(get(), get()) }
|
|
addFactory { SetMigrateSorting(get()) }
|
|
}
|
|
}
|