2022-04-22 17:29:24 -04:00
|
|
|
package eu.kanade.domain
|
|
|
|
|
2022-06-16 10:59:10 -04:00
|
|
|
import eu.kanade.data.category.CategoryRepositoryImpl
|
2022-05-28 09:09:27 -04:00
|
|
|
import eu.kanade.data.chapter.ChapterRepositoryImpl
|
2022-04-22 17:29:24 -04:00
|
|
|
import eu.kanade.data.history.HistoryRepositoryImpl
|
2022-04-30 09:37:10 -04:00
|
|
|
import eu.kanade.data.manga.MangaRepositoryImpl
|
2022-07-16 15:08:15 -04:00
|
|
|
import eu.kanade.data.source.SourceDataRepositoryImpl
|
2022-04-24 14:35:59 -04:00
|
|
|
import eu.kanade.data.source.SourceRepositoryImpl
|
2022-06-21 17:27:55 -04:00
|
|
|
import eu.kanade.data.track.TrackRepositoryImpl
|
2022-07-17 22:17:40 -04:00
|
|
|
import eu.kanade.data.updates.UpdatesRepositoryImpl
|
2022-07-09 12:31:14 -04:00
|
|
|
import eu.kanade.domain.category.interactor.CreateCategoryWithName
|
2022-06-16 10:59:10 -04:00
|
|
|
import eu.kanade.domain.category.interactor.DeleteCategory
|
|
|
|
import eu.kanade.domain.category.interactor.GetCategories
|
2022-07-09 12:31:14 -04:00
|
|
|
import eu.kanade.domain.category.interactor.RenameCategory
|
|
|
|
import eu.kanade.domain.category.interactor.ReorderCategory
|
2022-07-02 12:55:34 -04:00
|
|
|
import eu.kanade.domain.category.interactor.SetMangaCategories
|
2022-06-16 10:59:10 -04:00
|
|
|
import eu.kanade.domain.category.interactor.UpdateCategory
|
|
|
|
import eu.kanade.domain.category.repository.CategoryRepository
|
2022-07-02 12:43:18 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.GetChapter
|
2022-06-12 11:23:41 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.GetChapterByMangaId
|
2022-07-07 22:34:58 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.SetReadStatus
|
2022-06-11 11:38:39 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.ShouldUpdateDbChapter
|
|
|
|
import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource
|
2022-06-26 15:54:34 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.SyncChaptersWithTrackServiceTwoWay
|
2022-05-28 09:09:27 -04:00
|
|
|
import eu.kanade.domain.chapter.interactor.UpdateChapter
|
|
|
|
import eu.kanade.domain.chapter.repository.ChapterRepository
|
2022-07-07 22:34:58 -04:00
|
|
|
import eu.kanade.domain.download.interactor.DeleteDownload
|
2022-05-19 17:29:40 -04:00
|
|
|
import eu.kanade.domain.extension.interactor.GetExtensionLanguages
|
2022-05-07 23:34:55 -04:00
|
|
|
import eu.kanade.domain.extension.interactor.GetExtensionSources
|
2022-07-29 15:09:49 -04:00
|
|
|
import eu.kanade.domain.extension.interactor.GetExtensionsByType
|
2022-04-22 17:29:24 -04:00
|
|
|
import eu.kanade.domain.history.interactor.DeleteHistoryTable
|
|
|
|
import eu.kanade.domain.history.interactor.GetHistory
|
2022-05-31 22:55:58 -04:00
|
|
|
import eu.kanade.domain.history.interactor.GetNextChapter
|
2022-04-22 17:29:24 -04:00
|
|
|
import eu.kanade.domain.history.interactor.RemoveHistoryById
|
|
|
|
import eu.kanade.domain.history.interactor.RemoveHistoryByMangaId
|
2022-05-28 09:09:27 -04:00
|
|
|
import eu.kanade.domain.history.interactor.UpsertHistory
|
2022-04-22 17:29:24 -04:00
|
|
|
import eu.kanade.domain.history.repository.HistoryRepository
|
2022-06-19 10:15:17 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.GetDuplicateLibraryManga
|
2022-07-02 15:19:52 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.GetFavorites
|
2022-07-03 10:17:41 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.GetLibraryManga
|
|
|
|
import eu.kanade.domain.manga.interactor.GetManga
|
2022-06-21 17:27:55 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.GetMangaWithChapters
|
2022-07-03 10:17:41 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.InsertManga
|
2022-05-12 09:00:57 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.ResetViewerFlags
|
2022-06-25 11:03:48 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.SetMangaChapterFlags
|
2022-07-03 10:17:41 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.SetMangaViewerFlags
|
2022-06-12 10:21:45 -04:00
|
|
|
import eu.kanade.domain.manga.interactor.UpdateManga
|
2022-04-30 09:37:10 -04:00
|
|
|
import eu.kanade.domain.manga.repository.MangaRepository
|
2022-04-24 14:35:59 -04:00
|
|
|
import eu.kanade.domain.source.interactor.GetEnabledSources
|
2022-04-30 11:49:02 -04:00
|
|
|
import eu.kanade.domain.source.interactor.GetLanguagesWithSources
|
2022-04-27 08:36:16 -04:00
|
|
|
import eu.kanade.domain.source.interactor.GetSourcesWithFavoriteCount
|
2022-06-10 21:33:56 -04:00
|
|
|
import eu.kanade.domain.source.interactor.GetSourcesWithNonLibraryManga
|
2022-04-27 08:36:16 -04:00
|
|
|
import eu.kanade.domain.source.interactor.SetMigrateSorting
|
2022-04-30 11:49:02 -04:00
|
|
|
import eu.kanade.domain.source.interactor.ToggleLanguage
|
|
|
|
import eu.kanade.domain.source.interactor.ToggleSource
|
2022-04-24 14:35:59 -04:00
|
|
|
import eu.kanade.domain.source.interactor.ToggleSourcePin
|
2022-07-16 15:08:15 -04:00
|
|
|
import eu.kanade.domain.source.repository.SourceDataRepository
|
2022-04-24 14:35:59 -04:00
|
|
|
import eu.kanade.domain.source.repository.SourceRepository
|
2022-06-26 15:54:34 -04:00
|
|
|
import eu.kanade.domain.track.interactor.DeleteTrack
|
2022-06-21 17:27:55 -04:00
|
|
|
import eu.kanade.domain.track.interactor.GetTracks
|
|
|
|
import eu.kanade.domain.track.interactor.InsertTrack
|
|
|
|
import eu.kanade.domain.track.repository.TrackRepository
|
2022-07-17 22:17:40 -04:00
|
|
|
import eu.kanade.domain.updates.interactor.GetUpdates
|
|
|
|
import eu.kanade.domain.updates.repository.UpdatesRepository
|
2022-04-22 17:29:24 -04:00
|
|
|
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() {
|
2022-06-16 10:59:10 -04:00
|
|
|
addSingletonFactory<CategoryRepository> { CategoryRepositoryImpl(get()) }
|
|
|
|
addFactory { GetCategories(get()) }
|
2022-07-09 12:31:14 -04:00
|
|
|
addFactory { CreateCategoryWithName(get()) }
|
|
|
|
addFactory { RenameCategory(get()) }
|
|
|
|
addFactory { ReorderCategory(get()) }
|
2022-06-16 10:59:10 -04:00
|
|
|
addFactory { UpdateCategory(get()) }
|
|
|
|
addFactory { DeleteCategory(get()) }
|
|
|
|
|
2022-04-30 09:37:10 -04:00
|
|
|
addSingletonFactory<MangaRepository> { MangaRepositoryImpl(get()) }
|
2022-06-19 10:15:17 -04:00
|
|
|
addFactory { GetDuplicateLibraryManga(get()) }
|
2022-07-02 15:19:52 -04:00
|
|
|
addFactory { GetFavorites(get()) }
|
2022-07-03 10:17:41 -04:00
|
|
|
addFactory { GetLibraryManga(get()) }
|
2022-06-21 17:27:55 -04:00
|
|
|
addFactory { GetMangaWithChapters(get(), get()) }
|
2022-07-03 10:17:41 -04:00
|
|
|
addFactory { GetManga(get()) }
|
2022-05-31 22:55:58 -04:00
|
|
|
addFactory { GetNextChapter(get()) }
|
2022-05-12 09:00:57 -04:00
|
|
|
addFactory { ResetViewerFlags(get()) }
|
2022-06-25 11:03:48 -04:00
|
|
|
addFactory { SetMangaChapterFlags(get()) }
|
2022-07-03 10:17:41 -04:00
|
|
|
addFactory { SetMangaViewerFlags(get()) }
|
|
|
|
addFactory { InsertManga(get()) }
|
2022-06-12 10:21:45 -04:00
|
|
|
addFactory { UpdateManga(get()) }
|
2022-07-02 12:55:34 -04:00
|
|
|
addFactory { SetMangaCategories(get()) }
|
2022-06-21 17:27:55 -04:00
|
|
|
|
|
|
|
addSingletonFactory<TrackRepository> { TrackRepositoryImpl(get()) }
|
2022-06-26 15:54:34 -04:00
|
|
|
addFactory { DeleteTrack(get()) }
|
2022-06-21 17:27:55 -04:00
|
|
|
addFactory { GetTracks(get()) }
|
|
|
|
addFactory { InsertTrack(get()) }
|
2022-04-24 16:16:05 -04:00
|
|
|
|
2022-05-28 09:09:27 -04:00
|
|
|
addSingletonFactory<ChapterRepository> { ChapterRepositoryImpl(get()) }
|
2022-07-02 12:43:18 -04:00
|
|
|
addFactory { GetChapter(get()) }
|
2022-06-12 11:23:41 -04:00
|
|
|
addFactory { GetChapterByMangaId(get()) }
|
2022-05-28 09:09:27 -04:00
|
|
|
addFactory { UpdateChapter(get()) }
|
2022-07-07 22:34:58 -04:00
|
|
|
addFactory { SetReadStatus(get(), get(), get(), get()) }
|
2022-06-11 11:38:39 -04:00
|
|
|
addFactory { ShouldUpdateDbChapter() }
|
|
|
|
addFactory { SyncChaptersWithSource(get(), get(), get(), get()) }
|
2022-06-26 15:54:34 -04:00
|
|
|
addFactory { SyncChaptersWithTrackServiceTwoWay(get(), get()) }
|
2022-05-28 09:09:27 -04:00
|
|
|
|
2022-04-22 17:29:24 -04:00
|
|
|
addSingletonFactory<HistoryRepository> { HistoryRepositoryImpl(get()) }
|
|
|
|
addFactory { DeleteHistoryTable(get()) }
|
|
|
|
addFactory { GetHistory(get()) }
|
2022-05-28 09:09:27 -04:00
|
|
|
addFactory { UpsertHistory(get()) }
|
2022-04-22 17:29:24 -04:00
|
|
|
addFactory { RemoveHistoryById(get()) }
|
|
|
|
addFactory { RemoveHistoryByMangaId(get()) }
|
2022-04-24 16:16:05 -04:00
|
|
|
|
2022-07-07 22:34:58 -04:00
|
|
|
addFactory { DeleteDownload(get(), get()) }
|
|
|
|
|
2022-07-29 15:09:49 -04:00
|
|
|
addFactory { GetExtensionsByType(get(), get()) }
|
2022-05-07 23:34:55 -04:00
|
|
|
addFactory { GetExtensionSources(get()) }
|
2022-05-19 17:29:40 -04:00
|
|
|
addFactory { GetExtensionLanguages(get(), get()) }
|
2022-05-15 09:59:53 -04:00
|
|
|
|
2022-07-17 22:17:40 -04:00
|
|
|
addSingletonFactory<UpdatesRepository> { UpdatesRepositoryImpl(get()) }
|
|
|
|
addFactory { GetUpdates(get(), get()) }
|
|
|
|
|
2022-04-27 08:36:16 -04:00
|
|
|
addSingletonFactory<SourceRepository> { SourceRepositoryImpl(get(), get()) }
|
2022-07-16 15:08:15 -04:00
|
|
|
addSingletonFactory<SourceDataRepository> { SourceDataRepositoryImpl(get()) }
|
2022-04-24 14:35:59 -04:00
|
|
|
addFactory { GetEnabledSources(get(), get()) }
|
2022-06-10 21:33:56 -04:00
|
|
|
addFactory { GetLanguagesWithSources(get(), get()) }
|
2022-04-27 08:36:16 -04:00
|
|
|
addFactory { GetSourcesWithFavoriteCount(get(), get()) }
|
2022-06-10 21:33:56 -04:00
|
|
|
addFactory { GetSourcesWithNonLibraryManga(get()) }
|
2022-04-27 08:36:16 -04:00
|
|
|
addFactory { SetMigrateSorting(get()) }
|
2022-04-30 11:49:02 -04:00
|
|
|
addFactory { ToggleLanguage(get()) }
|
2022-06-10 21:33:56 -04:00
|
|
|
addFactory { ToggleSource(get()) }
|
|
|
|
addFactory { ToggleSourcePin(get()) }
|
2022-04-22 17:29:24 -04:00
|
|
|
}
|
|
|
|
}
|