From f2c48480b687d4e01350e580a5648ae52bd5d107 Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 27 Jan 2023 22:37:17 -0500 Subject: [PATCH] Move some interactors to domain module --- app/src/main/java/eu/kanade/domain/DomainModule.kt | 14 +++++++------- .../chapter/interactor/SyncChaptersWithSource.kt | 1 + .../more/settings/screen/SettingsDownloadScreen.kt | 2 +- .../more/settings/screen/SettingsLibraryScreen.kt | 2 +- .../kanade/tachiyomi/data/backup/BackupManager.kt | 2 +- .../tachiyomi/data/download/DownloadManager.kt | 2 +- .../tachiyomi/data/library/LibraryUpdateService.kt | 2 +- .../ui/browse/migration/search/MigrateDialog.kt | 2 +- .../source/browse/BrowseSourceScreenModel.kt | 2 +- .../tachiyomi/ui/category/CategoryScreenModel.kt | 2 +- .../tachiyomi/ui/history/HistoryScreenModel.kt | 4 ++-- .../tachiyomi/ui/library/LibraryScreenModel.kt | 2 +- .../kanade/tachiyomi/ui/manga/MangaScreenModel.kt | 2 +- .../kanade/tachiyomi/ui/reader/ReaderViewModel.kt | 2 +- .../kanade/tachiyomi/ui/stats/StatsScreenModel.kt | 2 +- .../tachiyomi/ui/updates/UpdatesScreenModel.kt | 2 +- .../domain/category/interactor/GetCategories.kt | 2 +- .../chapter/interactor/ShouldUpdateDbChapter.kt | 2 +- .../domain/history/interactor/GetHistory.kt | 2 +- .../history/interactor/GetTotalReadDuration.kt | 2 +- .../domain/history/interactor/RemoveHistory.kt | 2 +- .../domain/history/interactor/UpsertHistory.kt | 2 +- .../domain/updates/interactor/GetUpdates.kt | 2 +- 23 files changed, 30 insertions(+), 29 deletions(-) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/category/interactor/GetCategories.kt (93%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/chapter/interactor/ShouldUpdateDbChapter.kt (91%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/history/interactor/GetHistory.kt (88%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/history/interactor/GetTotalReadDuration.kt (84%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/history/interactor/RemoveHistory.kt (91%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/history/interactor/UpsertHistory.kt (87%) rename {app/src/main/java/eu/kanade => domain/src/main/java/tachiyomi}/domain/updates/interactor/GetUpdates.kt (91%) diff --git a/app/src/main/java/eu/kanade/domain/DomainModule.kt b/app/src/main/java/eu/kanade/domain/DomainModule.kt index c1d19837c8..851f8819c9 100644 --- a/app/src/main/java/eu/kanade/domain/DomainModule.kt +++ b/app/src/main/java/eu/kanade/domain/DomainModule.kt @@ -3,7 +3,6 @@ package eu.kanade.domain import eu.kanade.data.source.SourceRepositoryImpl import eu.kanade.domain.category.interactor.CreateCategoryWithName import eu.kanade.domain.category.interactor.DeleteCategory -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.RenameCategory import eu.kanade.domain.category.interactor.ReorderCategory import eu.kanade.domain.category.interactor.ResetCategoryFlags @@ -15,7 +14,6 @@ import eu.kanade.domain.chapter.interactor.GetChapter import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SetMangaDefaultChapterFlags import eu.kanade.domain.chapter.interactor.SetReadStatus -import eu.kanade.domain.chapter.interactor.ShouldUpdateDbChapter import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource import eu.kanade.domain.chapter.interactor.SyncChaptersWithTrackServiceTwoWay import eu.kanade.domain.chapter.interactor.UpdateChapter @@ -23,11 +21,7 @@ import eu.kanade.domain.download.interactor.DeleteDownload import eu.kanade.domain.extension.interactor.GetExtensionLanguages import eu.kanade.domain.extension.interactor.GetExtensionSources import eu.kanade.domain.extension.interactor.GetExtensionsByType -import eu.kanade.domain.history.interactor.GetHistory import eu.kanade.domain.history.interactor.GetNextChapters -import eu.kanade.domain.history.interactor.GetTotalReadDuration -import eu.kanade.domain.history.interactor.RemoveHistory -import eu.kanade.domain.history.interactor.UpsertHistory import eu.kanade.domain.manga.interactor.GetDuplicateLibraryManga import eu.kanade.domain.manga.interactor.GetFavorites import eu.kanade.domain.manga.interactor.GetLibraryManga @@ -52,7 +46,6 @@ import eu.kanade.domain.track.interactor.DeleteTrack import eu.kanade.domain.track.interactor.GetTracks import eu.kanade.domain.track.interactor.GetTracksPerManga import eu.kanade.domain.track.interactor.InsertTrack -import eu.kanade.domain.updates.interactor.GetUpdates import tachiyomi.data.category.CategoryRepositoryImpl import tachiyomi.data.chapter.ChapterRepositoryImpl import tachiyomi.data.history.HistoryRepositoryImpl @@ -60,12 +53,19 @@ import tachiyomi.data.manga.MangaRepositoryImpl import tachiyomi.data.source.SourceDataRepositoryImpl import tachiyomi.data.track.TrackRepositoryImpl import tachiyomi.data.updates.UpdatesRepositoryImpl +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.repository.CategoryRepository +import tachiyomi.domain.chapter.interactor.ShouldUpdateDbChapter import tachiyomi.domain.chapter.repository.ChapterRepository +import tachiyomi.domain.history.interactor.GetHistory +import tachiyomi.domain.history.interactor.GetTotalReadDuration +import tachiyomi.domain.history.interactor.RemoveHistory +import tachiyomi.domain.history.interactor.UpsertHistory import tachiyomi.domain.history.repository.HistoryRepository import tachiyomi.domain.manga.repository.MangaRepository import tachiyomi.domain.source.repository.SourceDataRepository import tachiyomi.domain.track.repository.TrackRepository +import tachiyomi.domain.updates.interactor.GetUpdates import tachiyomi.domain.updates.repository.UpdatesRepository import uy.kohesive.injekt.api.InjektModule import uy.kohesive.injekt.api.InjektRegistrar diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt index c7a5f3ca95..32bb1a6003 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt @@ -12,6 +12,7 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.chapter.ChapterRecognition import tachiyomi.data.chapter.ChapterSanitizer +import tachiyomi.domain.chapter.interactor.ShouldUpdateDbChapter import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.NoChaptersException import tachiyomi.domain.chapter.model.toChapterUpdate diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt index 0dc0be3ca1..216acb0fd0 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt @@ -19,7 +19,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.util.fastMap import androidx.core.net.toUri import com.hippo.unifile.UniFile -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.presentation.category.visualName import eu.kanade.presentation.more.settings.Preference @@ -27,6 +26,7 @@ import eu.kanade.presentation.more.settings.widget.TriStateListDialog import eu.kanade.presentation.util.collectAsState import eu.kanade.tachiyomi.R import kotlinx.coroutines.runBlocking +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsLibraryScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsLibraryScreen.kt index 67a7682b3a..20b6c05f80 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsLibraryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsLibraryScreen.kt @@ -36,7 +36,6 @@ import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.currentOrThrow import com.commandiron.wheel_picker_compose.WheelPicker -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.ResetCategoryFlags import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.presentation.category.visualName @@ -56,6 +55,7 @@ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.ui.category.CategoryScreen import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupManager.kt index 375528a3ca..2e794fde74 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupManager.kt @@ -5,7 +5,6 @@ import android.content.Context import android.net.Uri import com.hippo.unifile.UniFile import eu.kanade.domain.backup.service.BackupPreferences -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.manga.interactor.GetFavorites import eu.kanade.tachiyomi.R @@ -43,6 +42,7 @@ import tachiyomi.data.DatabaseHandler import tachiyomi.data.Manga_sync import tachiyomi.data.Mangas import tachiyomi.data.updateStrategyAdapter +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import tachiyomi.domain.history.model.HistoryUpdate import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index 6cca2074ea..0e9bdfcbf9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.data.download import android.content.Context -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download @@ -13,6 +12,7 @@ import kotlinx.coroutines.runBlocking import logcat.LogPriority import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.system.logcat +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index 77d10cc534..97236a3a47 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -6,7 +6,6 @@ import android.content.Intent import android.os.IBinder import android.os.PowerManager import androidx.core.content.ContextCompat -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource import eu.kanade.domain.chapter.interactor.SyncChaptersWithTrackServiceTwoWay @@ -61,6 +60,7 @@ import logcat.LogPriority import tachiyomi.core.preference.getAndSet import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.system.logcat +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.NoChaptersException diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt index 2da62f722b..b0db140a5d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt @@ -25,7 +25,6 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.util.fastForEachIndexed import cafe.adriel.voyager.core.model.StateScreenModel -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.SetMangaCategories import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource @@ -49,6 +48,7 @@ import tachiyomi.core.preference.Preference import tachiyomi.core.preference.PreferenceStore import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.lang.withUIContext +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.chapter.model.toChapterUpdate import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.MangaUpdate diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt index 74bbe2a321..6c2e5fc575 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt @@ -17,7 +17,6 @@ import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.core.prefs.CheckboxState import eu.kanade.core.prefs.asState import eu.kanade.core.prefs.mapAsCheckboxState -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.SetMangaCategories import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SetMangaDefaultChapterFlags @@ -70,6 +69,7 @@ import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.core.util.system.logcat +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.toMangaUpdate diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt index f929d4b239..e659db769e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt @@ -6,7 +6,6 @@ import cafe.adriel.voyager.core.model.StateScreenModel import cafe.adriel.voyager.core.model.coroutineScope import eu.kanade.domain.category.interactor.CreateCategoryWithName import eu.kanade.domain.category.interactor.DeleteCategory -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.RenameCategory import eu.kanade.domain.category.interactor.ReorderCategory import eu.kanade.tachiyomi.R @@ -15,6 +14,7 @@ import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt index 8a935d8641..e38f790d1b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt @@ -4,9 +4,7 @@ import androidx.compose.runtime.Immutable import cafe.adriel.voyager.core.model.StateScreenModel import cafe.adriel.voyager.core.model.coroutineScope import eu.kanade.core.util.insertSeparators -import eu.kanade.domain.history.interactor.GetHistory import eu.kanade.domain.history.interactor.GetNextChapters -import eu.kanade.domain.history.interactor.RemoveHistory import eu.kanade.presentation.history.HistoryUiModel import eu.kanade.tachiyomi.util.lang.toDateKey import kotlinx.coroutines.Dispatchers @@ -25,6 +23,8 @@ import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter +import tachiyomi.domain.history.interactor.GetHistory +import tachiyomi.domain.history.interactor.RemoveHistory import tachiyomi.domain.history.model.HistoryWithRelations import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt index f8f75f930d..8e004d81cc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt @@ -16,7 +16,6 @@ import eu.kanade.core.util.fastFilterNot import eu.kanade.core.util.fastMapNotNull import eu.kanade.core.util.fastPartition import eu.kanade.domain.base.BasePreferences -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.SetMangaCategories import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SetReadStatus @@ -53,6 +52,7 @@ import kotlinx.coroutines.flow.update import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.core.util.lang.withIOContext +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.library.model.LibraryManga diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index e8682d11b3..0748037ee8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -12,7 +12,6 @@ import eu.kanade.core.prefs.CheckboxState import eu.kanade.core.prefs.asState import eu.kanade.core.prefs.mapAsCheckboxState import eu.kanade.core.util.addOrRemove -import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.SetMangaCategories import eu.kanade.domain.chapter.interactor.SetMangaDefaultChapterFlags import eu.kanade.domain.chapter.interactor.SetReadStatus @@ -66,6 +65,7 @@ import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.lang.withUIContext import tachiyomi.core.util.system.logcat +import tachiyomi.domain.category.interactor.GetCategories import tachiyomi.domain.category.model.Category import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.ChapterUpdate diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt index ee164e2378..825f682463 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt @@ -12,7 +12,6 @@ import eu.kanade.domain.chapter.interactor.UpdateChapter import eu.kanade.domain.chapter.model.toDbChapter import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.domain.history.interactor.GetNextChapters -import eu.kanade.domain.history.interactor.UpsertHistory import eu.kanade.domain.manga.interactor.GetManga import eu.kanade.domain.manga.interactor.SetMangaViewerFlags import eu.kanade.domain.manga.model.isLocal @@ -76,6 +75,7 @@ import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.lang.withUIContext import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.ChapterUpdate +import tachiyomi.domain.history.interactor.UpsertHistory import tachiyomi.domain.history.model.HistoryUpdate import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt index cc112675bd..a1bcda2fcd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt @@ -7,7 +7,6 @@ import eu.kanade.core.util.fastDistinctBy import eu.kanade.core.util.fastFilter import eu.kanade.core.util.fastFilterNot import eu.kanade.core.util.fastMapNotNull -import eu.kanade.domain.history.interactor.GetTotalReadDuration import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.manga.interactor.GetLibraryManga import eu.kanade.domain.manga.model.isLocal @@ -22,6 +21,7 @@ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.source.model.SManga import kotlinx.coroutines.flow.update import tachiyomi.core.util.lang.launchIO +import tachiyomi.domain.history.interactor.GetTotalReadDuration import tachiyomi.domain.library.model.LibraryManga import tachiyomi.domain.track.model.Track import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt index 494f445391..cd85c55d6b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt @@ -17,7 +17,6 @@ import eu.kanade.domain.chapter.interactor.UpdateChapter import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.manga.interactor.GetManga import eu.kanade.domain.ui.UiPreferences -import eu.kanade.domain.updates.interactor.GetUpdates import eu.kanade.presentation.components.ChapterDownloadAction import eu.kanade.presentation.updates.UpdatesUiModel import eu.kanade.tachiyomi.data.download.DownloadCache @@ -43,6 +42,7 @@ import tachiyomi.core.util.lang.launchIO import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.ChapterUpdate +import tachiyomi.domain.updates.interactor.GetUpdates import tachiyomi.domain.updates.model.UpdatesWithRelations import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/GetCategories.kt b/domain/src/main/java/tachiyomi/domain/category/interactor/GetCategories.kt similarity index 93% rename from app/src/main/java/eu/kanade/domain/category/interactor/GetCategories.kt rename to domain/src/main/java/tachiyomi/domain/category/interactor/GetCategories.kt index 379d7d7374..1d05ce611f 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/GetCategories.kt +++ b/domain/src/main/java/tachiyomi/domain/category/interactor/GetCategories.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.category.interactor +package tachiyomi.domain.category.interactor import kotlinx.coroutines.flow.Flow import tachiyomi.domain.category.model.Category diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/ShouldUpdateDbChapter.kt b/domain/src/main/java/tachiyomi/domain/chapter/interactor/ShouldUpdateDbChapter.kt similarity index 91% rename from app/src/main/java/eu/kanade/domain/chapter/interactor/ShouldUpdateDbChapter.kt rename to domain/src/main/java/tachiyomi/domain/chapter/interactor/ShouldUpdateDbChapter.kt index 32ce3ec6d3..5e5ac0fe68 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/ShouldUpdateDbChapter.kt +++ b/domain/src/main/java/tachiyomi/domain/chapter/interactor/ShouldUpdateDbChapter.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.chapter.interactor +package tachiyomi.domain.chapter.interactor import tachiyomi.domain.chapter.model.Chapter diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt b/domain/src/main/java/tachiyomi/domain/history/interactor/GetHistory.kt similarity index 88% rename from app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt rename to domain/src/main/java/tachiyomi/domain/history/interactor/GetHistory.kt index 066ff15382..dd19a9e8f7 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt +++ b/domain/src/main/java/tachiyomi/domain/history/interactor/GetHistory.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.history.interactor +package tachiyomi.domain.history.interactor import kotlinx.coroutines.flow.Flow import tachiyomi.domain.history.model.HistoryWithRelations diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/GetTotalReadDuration.kt b/domain/src/main/java/tachiyomi/domain/history/interactor/GetTotalReadDuration.kt similarity index 84% rename from app/src/main/java/eu/kanade/domain/history/interactor/GetTotalReadDuration.kt rename to domain/src/main/java/tachiyomi/domain/history/interactor/GetTotalReadDuration.kt index f4f2969ad4..9bde36520e 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/GetTotalReadDuration.kt +++ b/domain/src/main/java/tachiyomi/domain/history/interactor/GetTotalReadDuration.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.history.interactor +package tachiyomi.domain.history.interactor import tachiyomi.domain.history.repository.HistoryRepository diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistory.kt b/domain/src/main/java/tachiyomi/domain/history/interactor/RemoveHistory.kt similarity index 91% rename from app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistory.kt rename to domain/src/main/java/tachiyomi/domain/history/interactor/RemoveHistory.kt index db24a2ab40..c6c8398ede 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistory.kt +++ b/domain/src/main/java/tachiyomi/domain/history/interactor/RemoveHistory.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.history.interactor +package tachiyomi.domain.history.interactor import tachiyomi.domain.history.model.HistoryWithRelations import tachiyomi.domain.history.repository.HistoryRepository diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/UpsertHistory.kt b/domain/src/main/java/tachiyomi/domain/history/interactor/UpsertHistory.kt similarity index 87% rename from app/src/main/java/eu/kanade/domain/history/interactor/UpsertHistory.kt rename to domain/src/main/java/tachiyomi/domain/history/interactor/UpsertHistory.kt index aaa6dbd0a2..86b041b77c 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/UpsertHistory.kt +++ b/domain/src/main/java/tachiyomi/domain/history/interactor/UpsertHistory.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.history.interactor +package tachiyomi.domain.history.interactor import tachiyomi.domain.history.model.HistoryUpdate import tachiyomi.domain.history.repository.HistoryRepository diff --git a/app/src/main/java/eu/kanade/domain/updates/interactor/GetUpdates.kt b/domain/src/main/java/tachiyomi/domain/updates/interactor/GetUpdates.kt similarity index 91% rename from app/src/main/java/eu/kanade/domain/updates/interactor/GetUpdates.kt rename to domain/src/main/java/tachiyomi/domain/updates/interactor/GetUpdates.kt index 9e5cfd9e41..3412250dcf 100644 --- a/app/src/main/java/eu/kanade/domain/updates/interactor/GetUpdates.kt +++ b/domain/src/main/java/tachiyomi/domain/updates/interactor/GetUpdates.kt @@ -1,4 +1,4 @@ -package eu.kanade.domain.updates.interactor +package tachiyomi.domain.updates.interactor import kotlinx.coroutines.flow.Flow import tachiyomi.domain.updates.model.UpdatesWithRelations