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