diff --git a/app/src/main/java/eu/kanade/core/prefs/PreferenceMutableState.kt b/app/src/main/java/eu/kanade/core/prefs/PreferenceMutableState.kt index b8c41b45f..c33b24091 100644 --- a/app/src/main/java/eu/kanade/core/prefs/PreferenceMutableState.kt +++ b/app/src/main/java/eu/kanade/core/prefs/PreferenceMutableState.kt @@ -2,10 +2,10 @@ package eu.kanade.core.prefs import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf -import eu.kanade.tachiyomi.core.preference.Preference import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach +import tachiyomi.core.preference.Preference class PreferenceMutableState( private val preference: Preference, diff --git a/app/src/main/java/eu/kanade/data/source/NoResultsException.kt b/app/src/main/java/eu/kanade/data/source/NoResultsException.kt deleted file mode 100644 index e0eee5fc6..000000000 --- a/app/src/main/java/eu/kanade/data/source/NoResultsException.kt +++ /dev/null @@ -1,3 +0,0 @@ -package eu.kanade.data.source - -class NoResultsException : Exception() diff --git a/app/src/main/java/eu/kanade/data/source/SourceMapper.kt b/app/src/main/java/eu/kanade/data/source/SourceMapper.kt index 509cfa33a..0f3dd2f9b 100644 --- a/app/src/main/java/eu/kanade/data/source/SourceMapper.kt +++ b/app/src/main/java/eu/kanade/data/source/SourceMapper.kt @@ -3,7 +3,6 @@ package eu.kanade.data.source import eu.kanade.tachiyomi.source.CatalogueSource import eu.kanade.tachiyomi.source.SourceManager import tachiyomi.domain.source.model.Source -import tachiyomi.domain.source.model.SourceData val sourceMapper: (eu.kanade.tachiyomi.source.Source) -> Source = { source -> Source( @@ -18,7 +17,3 @@ val sourceMapper: (eu.kanade.tachiyomi.source.Source) -> Source = { source -> val catalogueSourceMapper: (CatalogueSource) -> Source = { source -> sourceMapper(source).copy(supportsLatest = source.supportsLatest) } - -val sourceDataMapper: (Long, String, String) -> SourceData = { id, lang, name -> - SourceData(id, lang, name) -} diff --git a/app/src/main/java/eu/kanade/data/source/SourcePagingSource.kt b/app/src/main/java/eu/kanade/data/source/SourcePagingSource.kt index 87c6e1c51..c5b724be7 100644 --- a/app/src/main/java/eu/kanade/data/source/SourcePagingSource.kt +++ b/app/src/main/java/eu/kanade/data/source/SourcePagingSource.kt @@ -6,8 +6,8 @@ import eu.kanade.tachiyomi.source.CatalogueSource import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.util.lang.awaitSingle -import eu.kanade.tachiyomi.util.lang.withIOContext +import tachiyomi.core.util.lang.awaitSingle +import tachiyomi.core.util.lang.withIOContext abstract class SourcePagingSource( protected val source: CatalogueSource, @@ -60,3 +60,5 @@ class SourceLatestPagingSource(source: CatalogueSource) : SourcePagingSource(sou return source.fetchLatestUpdates(currentPage).awaitSingle() } } + +class NoResultsException : Exception() diff --git a/app/src/main/java/eu/kanade/domain/DomainModule.kt b/app/src/main/java/eu/kanade/domain/DomainModule.kt index 55c9ea9c5..c1d19837c 100644 --- a/app/src/main/java/eu/kanade/domain/DomainModule.kt +++ b/app/src/main/java/eu/kanade/domain/DomainModule.kt @@ -1,6 +1,5 @@ package eu.kanade.domain -import eu.kanade.data.source.SourceDataRepositoryImpl import eu.kanade.data.source.SourceRepositoryImpl import eu.kanade.domain.category.interactor.CreateCategoryWithName import eu.kanade.domain.category.interactor.DeleteCategory @@ -58,6 +57,7 @@ import tachiyomi.data.category.CategoryRepositoryImpl import tachiyomi.data.chapter.ChapterRepositoryImpl import tachiyomi.data.history.HistoryRepositoryImpl import tachiyomi.data.manga.MangaRepositoryImpl +import tachiyomi.data.source.SourceDataRepositoryImpl import tachiyomi.data.track.TrackRepositoryImpl import tachiyomi.data.updates.UpdatesRepositoryImpl import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/backup/service/BackupPreferences.kt b/app/src/main/java/eu/kanade/domain/backup/service/BackupPreferences.kt index 71c35745a..3623c5551 100644 --- a/app/src/main/java/eu/kanade/domain/backup/service/BackupPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/backup/service/BackupPreferences.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.backup.service -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.provider.FolderProvider +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.provider.FolderProvider class BackupPreferences( private val folderProvider: FolderProvider, diff --git a/app/src/main/java/eu/kanade/domain/base/BasePreferences.kt b/app/src/main/java/eu/kanade/domain/base/BasePreferences.kt index 986856c0c..bf9ec8ec3 100644 --- a/app/src/main/java/eu/kanade/domain/base/BasePreferences.kt +++ b/app/src/main/java/eu/kanade/domain/base/BasePreferences.kt @@ -1,9 +1,9 @@ package eu.kanade.domain.base import android.content.Context -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.util.system.isPreviewBuildType import eu.kanade.tachiyomi.util.system.isReleaseBuildType +import tachiyomi.core.preference.PreferenceStore class BasePreferences( val context: Context, diff --git a/app/src/main/java/eu/kanade/domain/base/ExtensionInstallerPreference.kt b/app/src/main/java/eu/kanade/domain/base/ExtensionInstallerPreference.kt index 89fc27b7f..a981bd0ff 100644 --- a/app/src/main/java/eu/kanade/domain/base/ExtensionInstallerPreference.kt +++ b/app/src/main/java/eu/kanade/domain/base/ExtensionInstallerPreference.kt @@ -1,13 +1,13 @@ package eu.kanade.domain.base import android.content.Context -import eu.kanade.tachiyomi.core.preference.Preference -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.preference.getEnum import eu.kanade.tachiyomi.data.preference.PreferenceValues.ExtensionInstaller import eu.kanade.tachiyomi.util.system.hasMiuiPackageInstaller import eu.kanade.tachiyomi.util.system.isShizukuInstalled import kotlinx.coroutines.CoroutineScope +import tachiyomi.core.preference.Preference +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.getEnum class ExtensionInstallerPreference( private val context: Context, diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/CreateCategoryWithName.kt b/app/src/main/java/eu/kanade/domain/category/interactor/CreateCategoryWithName.kt index 07e32d434..b71911ceb 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/CreateCategoryWithName.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/CreateCategoryWithName.kt @@ -1,9 +1,9 @@ package eu.kanade.domain.category.interactor import eu.kanade.domain.library.service.LibraryPreferences -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.category.model.Category import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/DeleteCategory.kt b/app/src/main/java/eu/kanade/domain/category/interactor/DeleteCategory.kt index 66af386b8..ac4216876 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/DeleteCategory.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/DeleteCategory.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.category.interactor -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.category.model.CategoryUpdate import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/RenameCategory.kt b/app/src/main/java/eu/kanade/domain/category/interactor/RenameCategory.kt index 1053cdd80..9f423966d 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/RenameCategory.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/RenameCategory.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.category.interactor -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.category.model.Category import tachiyomi.domain.category.model.CategoryUpdate import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/ReorderCategory.kt b/app/src/main/java/eu/kanade/domain/category/interactor/ReorderCategory.kt index 5df5940d9..4bbdb2fcc 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/ReorderCategory.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/ReorderCategory.kt @@ -1,10 +1,10 @@ package eu.kanade.domain.category.interactor -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import logcat.LogPriority +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.category.model.Category import tachiyomi.domain.category.model.CategoryUpdate import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/SetMangaCategories.kt b/app/src/main/java/eu/kanade/domain/category/interactor/SetMangaCategories.kt index 04fafc5e2..5ffa9e52a 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/SetMangaCategories.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/SetMangaCategories.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.category.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.repository.MangaRepository class SetMangaCategories( diff --git a/app/src/main/java/eu/kanade/domain/category/interactor/UpdateCategory.kt b/app/src/main/java/eu/kanade/domain/category/interactor/UpdateCategory.kt index 265017ab2..d2a1cc80a 100644 --- a/app/src/main/java/eu/kanade/domain/category/interactor/UpdateCategory.kt +++ b/app/src/main/java/eu/kanade/domain/category/interactor/UpdateCategory.kt @@ -1,6 +1,6 @@ package eu.kanade.domain.category.interactor -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext +import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.domain.category.model.CategoryUpdate import tachiyomi.domain.category.repository.CategoryRepository diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapter.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapter.kt index 9f82fed70..175e43dbe 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapter.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapter.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.chapter.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.repository.ChapterRepository diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapterByMangaId.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapterByMangaId.kt index c9c1dcbf8..4492b37d0 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapterByMangaId.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/GetChapterByMangaId.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.chapter.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.repository.ChapterRepository diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SetDefaultChapterSettings.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SetDefaultChapterSettings.kt index 0e9ea9518..761d6ae08 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SetDefaultChapterSettings.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SetDefaultChapterSettings.kt @@ -3,7 +3,7 @@ package eu.kanade.domain.chapter.interactor import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.manga.interactor.GetFavorites import eu.kanade.domain.manga.interactor.SetMangaChapterFlags -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext +import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.domain.manga.model.Manga class SetMangaDefaultChapterFlags( diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SetReadStatus.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SetReadStatus.kt index 6a39e468f..c740dc7a6 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SetReadStatus.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SetReadStatus.kt @@ -2,9 +2,9 @@ package eu.kanade.domain.chapter.interactor import eu.kanade.domain.download.interactor.DeleteDownload import eu.kanade.domain.download.service.DownloadPreferences -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.ChapterUpdate import tachiyomi.domain.chapter.repository.ChapterRepository diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt index 513b1c2eb..ef78ac50a 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt @@ -3,8 +3,8 @@ package eu.kanade.domain.chapter.interactor import eu.kanade.domain.track.interactor.InsertTrack import eu.kanade.domain.track.model.toDbTrack import eu.kanade.tachiyomi.data.track.TrackService -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.toChapterUpdate import tachiyomi.domain.track.model.Track diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/UpdateChapter.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/UpdateChapter.kt index d2944733c..1d372711b 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/UpdateChapter.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/UpdateChapter.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.chapter.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.ChapterUpdate import tachiyomi.domain.chapter.repository.ChapterRepository diff --git a/app/src/main/java/eu/kanade/domain/download/interactor/DeleteDownload.kt b/app/src/main/java/eu/kanade/domain/download/interactor/DeleteDownload.kt index 95d94f906..42a902c92 100644 --- a/app/src/main/java/eu/kanade/domain/download/interactor/DeleteDownload.kt +++ b/app/src/main/java/eu/kanade/domain/download/interactor/DeleteDownload.kt @@ -2,7 +2,7 @@ package eu.kanade.domain.download.interactor import eu.kanade.tachiyomi.data.download.DownloadManager import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext +import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga diff --git a/app/src/main/java/eu/kanade/domain/download/service/DownloadPreferences.kt b/app/src/main/java/eu/kanade/domain/download/service/DownloadPreferences.kt index 76b0465a6..fcfcce1f9 100644 --- a/app/src/main/java/eu/kanade/domain/download/service/DownloadPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/download/service/DownloadPreferences.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.download.service -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.provider.FolderProvider +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.provider.FolderProvider class DownloadPreferences( private val folderProvider: FolderProvider, diff --git a/app/src/main/java/eu/kanade/domain/library/service/LibraryPreferences.kt b/app/src/main/java/eu/kanade/domain/library/service/LibraryPreferences.kt index 60d3dd56d..2f3b126fe 100644 --- a/app/src/main/java/eu/kanade/domain/library/service/LibraryPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/library/service/LibraryPreferences.kt @@ -1,11 +1,11 @@ package eu.kanade.domain.library.service -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.data.preference.DEVICE_ONLY_ON_WIFI import eu.kanade.tachiyomi.data.preference.MANGA_HAS_UNREAD import eu.kanade.tachiyomi.data.preference.MANGA_NON_COMPLETED import eu.kanade.tachiyomi.data.preference.MANGA_NON_READ import eu.kanade.tachiyomi.widget.ExtendedNavigationView +import tachiyomi.core.preference.PreferenceStore import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibrarySort import tachiyomi.domain.manga.model.Manga diff --git a/app/src/main/java/eu/kanade/domain/manga/interactor/GetManga.kt b/app/src/main/java/eu/kanade/domain/manga/interactor/GetManga.kt index 7ea71048b..c17ae09e7 100644 --- a/app/src/main/java/eu/kanade/domain/manga/interactor/GetManga.kt +++ b/app/src/main/java/eu/kanade/domain/manga/interactor/GetManga.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.manga.interactor -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.repository.MangaRepository diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt index a26689218..bc601117b 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.source.interactor import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.tachiyomi.core.preference.getAndSet +import tachiyomi.core.preference.getAndSet class ToggleLanguage( val preferences: SourcePreferences, diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt index 9eb0ab8e6..fbcb3147c 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.source.interactor import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.tachiyomi.core.preference.getAndSet +import tachiyomi.core.preference.getAndSet import tachiyomi.domain.source.model.Source class ToggleSource( diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt index 532ce669c..e7ea8bb35 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.source.interactor import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.tachiyomi.core.preference.getAndSet +import tachiyomi.core.preference.getAndSet import tachiyomi.domain.source.model.Source class ToggleSourcePin( diff --git a/app/src/main/java/eu/kanade/domain/source/service/SourcePreferences.kt b/app/src/main/java/eu/kanade/domain/source/service/SourcePreferences.kt index db9e01ecc..626c56544 100644 --- a/app/src/main/java/eu/kanade/domain/source/service/SourcePreferences.kt +++ b/app/src/main/java/eu/kanade/domain/source/service/SourcePreferences.kt @@ -1,9 +1,9 @@ package eu.kanade.domain.source.service import eu.kanade.domain.source.interactor.SetMigrateSorting -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.preference.getEnum import eu.kanade.tachiyomi.util.system.LocaleHelper +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.getEnum import tachiyomi.domain.library.model.LibraryDisplayMode class SourcePreferences( diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt b/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt index 970dc864e..361658167 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.track.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.track.repository.TrackRepository class DeleteTrack( diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt index f02c96266..c611b9f50 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.track.interactor -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.track.model.Track import tachiyomi.domain.track.repository.TrackRepository diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt b/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt index 3da31e58f..7542cc866 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt @@ -1,7 +1,7 @@ package eu.kanade.domain.track.interactor -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.track.model.Track import tachiyomi.domain.track.repository.TrackRepository diff --git a/app/src/main/java/eu/kanade/domain/track/service/DelayedTrackingUpdateJob.kt b/app/src/main/java/eu/kanade/domain/track/service/DelayedTrackingUpdateJob.kt index 952d2493c..46703440a 100644 --- a/app/src/main/java/eu/kanade/domain/track/service/DelayedTrackingUpdateJob.kt +++ b/app/src/main/java/eu/kanade/domain/track/service/DelayedTrackingUpdateJob.kt @@ -14,9 +14,9 @@ import eu.kanade.domain.track.interactor.InsertTrack import eu.kanade.domain.track.model.toDbTrack import eu.kanade.domain.track.store.DelayedTrackingStore import eu.kanade.tachiyomi.data.track.TrackManager -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt b/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt index e14392e54..2ddba51e0 100644 --- a/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.track.service -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.data.track.anilist.Anilist +import tachiyomi.core.preference.PreferenceStore class TrackPreferences( private val preferenceStore: PreferenceStore, diff --git a/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt b/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt index 4d346706c..d7fc6fa10 100644 --- a/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt +++ b/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt @@ -2,8 +2,8 @@ package eu.kanade.domain.track.store import android.content.Context import androidx.core.content.edit -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.track.model.Track class DelayedTrackingStore(context: Context) { diff --git a/app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt b/app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt index 9a7577fee..5de3e963a 100644 --- a/app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt @@ -4,10 +4,10 @@ import android.os.Build import eu.kanade.domain.ui.model.AppTheme import eu.kanade.domain.ui.model.TabletUiMode import eu.kanade.domain.ui.model.ThemeMode -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.preference.getEnum import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.getEnum import java.text.DateFormat import java.text.SimpleDateFormat import java.util.Locale diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt index 5f5c703ad..862ecb93e 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt @@ -32,7 +32,7 @@ import eu.kanade.presentation.util.rememberResourceBitmapPainter import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.source.LocalSource -import eu.kanade.tachiyomi.util.lang.withIOContext +import tachiyomi.core.util.lang.withIOContext import tachiyomi.domain.source.model.Source private val defaultModifier = Modifier diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt index 13fe26a2b..f9d76535e 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt @@ -22,8 +22,8 @@ import eu.kanade.presentation.more.settings.widget.SwitchPreferenceWidget import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget import eu.kanade.presentation.more.settings.widget.TrackingPreferenceWidget import eu.kanade.presentation.util.collectAsState -import eu.kanade.tachiyomi.core.preference.PreferenceStore import kotlinx.coroutines.launch +import tachiyomi.core.preference.PreferenceStore import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceModel.kt b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceModel.kt index 16e5e518e..b5672f37c 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceModel.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceModel.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.res.stringResource import eu.kanade.domain.ui.model.AppTheme import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.TrackService -import eu.kanade.tachiyomi.core.preference.Preference as PreferenceData +import tachiyomi.core.preference.Preference as PreferenceData sealed class Preference { abstract val title: String diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/AboutScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/AboutScreen.kt index 01f763afd..931603ef2 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/AboutScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/AboutScreen.kt @@ -35,13 +35,13 @@ import eu.kanade.tachiyomi.data.updater.RELEASE_URL import eu.kanade.tachiyomi.ui.more.NewUpdateScreen import eu.kanade.tachiyomi.util.CrashLogUtil import eu.kanade.tachiyomi.util.lang.toDateTimestampString -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.system.copyToClipboard -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.text.DateFormat diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt index bb67ae5f7..c3ede3a40 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/ClearDatabaseScreen.kt @@ -45,12 +45,12 @@ import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.Scaffold import eu.kanade.presentation.util.selectedBackground import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchUI -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.update +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.launchUI +import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.data.Database import tachiyomi.domain.source.model.Source import tachiyomi.domain.source.model.SourceWithCount diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt index 2b57ecfc5..1ddc04c91 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt @@ -49,18 +49,18 @@ import eu.kanade.tachiyomi.network.PREF_DOH_QUAD101 import eu.kanade.tachiyomi.network.PREF_DOH_QUAD9 import eu.kanade.tachiyomi.network.PREF_DOH_SHECAN import eu.kanade.tachiyomi.util.CrashLogUtil -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.system.isPreviewBuildType import eu.kanade.tachiyomi.util.system.isReleaseBuildType import eu.kanade.tachiyomi.util.system.isShizukuInstalled -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.powerManager import eu.kanade.tachiyomi.util.system.setDefaultSettings import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.launch import logcat.LogPriority import okhttp3.Headers +import tachiyomi.core.util.lang.launchNonCancellable +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.repository.MangaRepository import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt index 2962c9087..582b6efa0 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt @@ -53,10 +53,10 @@ import eu.kanade.tachiyomi.data.track.bangumi.BangumiApi import eu.kanade.tachiyomi.data.track.myanimelist.MyAnimeListApi import eu.kanade.tachiyomi.data.track.shikimori.ShikimoriApi import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toast +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.withUIContext import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/presentation/util/Preference.kt b/app/src/main/java/eu/kanade/presentation/util/Preference.kt index 73888ed07..4b67009c6 100644 --- a/app/src/main/java/eu/kanade/presentation/util/Preference.kt +++ b/app/src/main/java/eu/kanade/presentation/util/Preference.kt @@ -4,7 +4,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.compose.runtime.collectAsState import androidx.compose.runtime.remember -import eu.kanade.tachiyomi.core.preference.Preference +import tachiyomi.core.preference.Preference @Composable fun Preference.collectAsState(): State { diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index dbb3e6ec7..ae018c2ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -42,7 +42,6 @@ import eu.kanade.tachiyomi.util.system.WebViewUtil import eu.kanade.tachiyomi.util.system.animatorDurationScale import eu.kanade.tachiyomi.util.system.isPreviewBuildType import eu.kanade.tachiyomi.util.system.isReleaseBuildType -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.notification import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.launchIn @@ -54,6 +53,7 @@ import org.acra.config.httpSender import org.acra.ktx.initAcra import org.acra.sender.HttpSender import org.conscrypt.Conscrypt +import tachiyomi.core.util.system.logcat import tachiyomi.presentation.widget.TachiyomiWidgetManager import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt index 707349229..fac18baf2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt @@ -15,10 +15,6 @@ import eu.kanade.domain.source.service.SourcePreferences import eu.kanade.domain.track.service.TrackPreferences import eu.kanade.domain.track.store.DelayedTrackingStore import eu.kanade.domain.ui.UiPreferences -import eu.kanade.tachiyomi.core.preference.AndroidPreferenceStore -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.provider.AndroidBackupFolderProvider -import eu.kanade.tachiyomi.core.provider.AndroidDownloadFolderProvider import eu.kanade.tachiyomi.core.security.SecurityPreferences import eu.kanade.tachiyomi.data.cache.ChapterCache import eu.kanade.tachiyomi.data.cache.CoverCache @@ -40,6 +36,10 @@ import nl.adaptivity.xmlutil.XmlDeclMode import nl.adaptivity.xmlutil.core.XmlVersion import nl.adaptivity.xmlutil.serialization.UnknownChildHandler import nl.adaptivity.xmlutil.serialization.XML +import tachiyomi.core.preference.AndroidPreferenceStore +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.provider.AndroidBackupFolderProvider +import tachiyomi.core.provider.AndroidDownloadFolderProvider import tachiyomi.data.AndroidDatabaseHandler import tachiyomi.data.Database import tachiyomi.data.DatabaseHandler diff --git a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt index 002c80ac5..cd8f088f1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt @@ -9,7 +9,6 @@ import eu.kanade.domain.base.BasePreferences import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.source.service.SourcePreferences import eu.kanade.domain.ui.UiPreferences -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.core.security.SecurityPreferences import eu.kanade.tachiyomi.data.backup.BackupCreatorJob import eu.kanade.tachiyomi.data.library.LibraryUpdateJob @@ -27,6 +26,7 @@ import eu.kanade.tachiyomi.util.preference.plusAssign import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.widget.ExtendedNavigationView +import tachiyomi.core.preference.PreferenceStore import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt b/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt index 668470071..ae7536381 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.crash import android.content.Context import android.content.Intent -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.serialization.KSerializer import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -11,6 +10,7 @@ import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.json.Json import logcat.LogPriority +import tachiyomi.core.util.system.logcat import kotlin.system.exitProcess class GlobalExceptionHandler private constructor( diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt index 2a5aec38e..136a5de2a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt @@ -16,9 +16,9 @@ import androidx.work.workDataOf import com.hippo.unifile.UniFile import eu.kanade.domain.backup.service.BackupPreferences import eu.kanade.tachiyomi.data.notification.Notifications -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.notificationManager import logcat.LogPriority +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.util.concurrent.TimeUnit 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 f2ff2e0d6..375528a3c 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 @@ -32,13 +32,13 @@ import eu.kanade.tachiyomi.data.database.models.Track import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.copyFrom import eu.kanade.tachiyomi.util.system.hasPermission -import eu.kanade.tachiyomi.util.system.logcat -import eu.kanade.tachiyomi.util.toLong import kotlinx.serialization.protobuf.ProtoBuf import logcat.LogPriority import okio.buffer import okio.gzip import okio.sink +import tachiyomi.core.util.lang.toLong +import tachiyomi.core.util.system.logcat import tachiyomi.data.DatabaseHandler import tachiyomi.data.Manga_sync import tachiyomi.data.Mangas diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt index a9615e7bf..04be1f069 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt @@ -12,7 +12,6 @@ import eu.kanade.tachiyomi.data.notification.Notifications import eu.kanade.tachiyomi.util.system.acquireWakeLock import eu.kanade.tachiyomi.util.system.getParcelableExtraCompat import eu.kanade.tachiyomi.util.system.isServiceRunning -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -20,6 +19,7 @@ import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.system.logcat /** * Restores backup. diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt index f5225bfc2..e36ebd2ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt @@ -16,7 +16,6 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.network.await import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.HttpSource -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority import okhttp3.CacheControl import okhttp3.Call @@ -27,6 +26,7 @@ import okio.Path.Companion.toOkioPath import okio.Source import okio.buffer import okio.sink +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.MangaCover import uy.kohesive.injekt.injectLazy import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt index 623f8ebb3..6b7dd9b6c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt @@ -8,9 +8,6 @@ import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.tachiyomi.extension.ExtensionManager import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -30,6 +27,9 @@ import kotlinx.coroutines.flow.shareIn import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.withTimeoutOrNull import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.launchNonCancellable +import tachiyomi.core.util.system.logcat 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/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index 96164a32f..6cca2074e 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 @@ -9,10 +9,10 @@ import eu.kanade.tachiyomi.data.download.model.DownloadQueue import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.runBlocking import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.system.logcat 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/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index 59864f4a4..581bf2a89 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -7,11 +7,11 @@ import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.util.storage.DiskUtil -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.MainScope import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import logcat.LogPriority +import tachiyomi.core.util.system.logcat 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/download/DownloadService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt index 62d90e7da..3c4e7c10f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt @@ -11,12 +11,10 @@ import androidx.core.content.ContextCompat import eu.kanade.domain.download.service.DownloadPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.notification.Notifications -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.system.acquireWakeLock import eu.kanade.tachiyomi.util.system.isConnectedToWifi import eu.kanade.tachiyomi.util.system.isOnline import eu.kanade.tachiyomi.util.system.isServiceRunning -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.notification import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.CoroutineScope @@ -30,6 +28,8 @@ import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import logcat.LogPriority import ru.beryukhov.reactivenetwork.ReactiveNetwork +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt index 98fc4fff2..9f350b7dd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt @@ -20,15 +20,11 @@ import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.source.online.fetchAllImageUrlsFromPageList import eu.kanade.tachiyomi.util.lang.RetryWithDelay -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNow import eu.kanade.tachiyomi.util.lang.plusAssign -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.DiskUtil.NOMEDIA_FILE import eu.kanade.tachiyomi.util.storage.saveTo import eu.kanade.tachiyomi.util.system.ImageUtil -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.async import logcat.LogPriority import nl.adaptivity.xmlutil.serialization.XML @@ -37,6 +33,10 @@ import rx.Observable import rx.android.schedulers.AndroidSchedulers import rx.schedulers.Schedulers import rx.subscriptions.CompositeSubscription +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.launchNow +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat 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/download/model/DownloadQueue.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt index 7b3867a7b..f3d79c63a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt @@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.data.download.model import eu.kanade.core.util.asFlow import eu.kanade.tachiyomi.data.download.DownloadStore import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.util.lang.launchNonCancellable import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.channels.Channel @@ -15,6 +14,7 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.shareIn import rx.Observable import rx.subjects.PublishSubject +import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt index 78269db55..9a989fdb6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt @@ -21,11 +21,11 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver import eu.kanade.tachiyomi.data.notification.Notifications import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.util.lang.chop -import eu.kanade.tachiyomi.util.lang.launchUI import eu.kanade.tachiyomi.util.system.notification import eu.kanade.tachiyomi.util.system.notificationBuilder import eu.kanade.tachiyomi.util.system.notificationManager import tachiyomi.core.Constants +import tachiyomi.core.util.lang.launchUI import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.injectLazy 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 b73e6a641..77d10cc53 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 @@ -22,7 +22,6 @@ import eu.kanade.domain.track.interactor.InsertTrack import eu.kanade.domain.track.model.toDbTrack import eu.kanade.domain.track.model.toDomainTrack import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.core.preference.getAndSet import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.download.DownloadManager import eu.kanade.tachiyomi.data.download.DownloadService @@ -38,7 +37,6 @@ import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.UnmeteredSource import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.model.UpdateStrategy -import eu.kanade.tachiyomi.util.lang.withIOContext import eu.kanade.tachiyomi.util.prepUpdateCover import eu.kanade.tachiyomi.util.shouldDownloadNewChapters import eu.kanade.tachiyomi.util.storage.getUriCompat @@ -46,7 +44,6 @@ import eu.kanade.tachiyomi.util.system.acquireWakeLock import eu.kanade.tachiyomi.util.system.createFileInCacheDir import eu.kanade.tachiyomi.util.system.getSerializableExtraCompat import eu.kanade.tachiyomi.util.system.isServiceRunning -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -61,6 +58,9 @@ import kotlinx.coroutines.supervisorScope import kotlinx.coroutines.sync.Semaphore import kotlinx.coroutines.sync.withPermit import logcat.LogPriority +import tachiyomi.core.preference.getAndSet +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat 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/data/notification/NotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt index e9c0e6a8e..d471938c1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt @@ -21,7 +21,6 @@ import eu.kanade.tachiyomi.data.updater.AppUpdateService import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.getUriCompat import eu.kanade.tachiyomi.util.system.getParcelableExtraCompat @@ -30,6 +29,7 @@ import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.runBlocking import tachiyomi.core.Constants +import tachiyomi.core.util.lang.launchIO import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.toChapterUpdate import tachiyomi.domain.manga.model.Manga diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt index 06457f0bc..b8a2befab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt @@ -16,9 +16,9 @@ import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.cacheImageDir import eu.kanade.tachiyomi.util.storage.getUriCompat import eu.kanade.tachiyomi.util.system.ImageUtil -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority import okio.IOException +import tachiyomi.core.util.system.logcat import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt index 27f81f80a..0d33de384 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt @@ -15,12 +15,12 @@ import eu.kanade.domain.track.service.TrackPreferences import eu.kanade.tachiyomi.data.database.models.Track import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.network.NetworkHelper -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toast import logcat.LogPriority import okhttp3.OkHttpClient +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt index 5d6850759..0cbd72c17 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt @@ -9,7 +9,6 @@ import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.network.jsonMime import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.serialization.json.JsonNull import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.buildJsonObject @@ -24,6 +23,7 @@ import kotlinx.serialization.json.put import kotlinx.serialization.json.putJsonObject import okhttp3.OkHttpClient import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.lang.withIOContext import java.util.Calendar import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt index e14210c77..6d10b9d2c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt @@ -9,7 +9,6 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject @@ -23,6 +22,7 @@ import okhttp3.CacheControl import okhttp3.FormBody import okhttp3.OkHttpClient import okhttp3.Request +import tachiyomi.core.util.lang.withIOContext import uy.kohesive.injekt.injectLazy import java.net.URLEncoder import java.nio.charset.StandardCharsets diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt index 210074c8e..f58b705f9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt @@ -6,13 +6,13 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority import okhttp3.Dns import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.OkHttpClient import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import java.io.IOException import java.net.SocketTimeoutException diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt index 3472a9566..917c50a56 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt @@ -8,7 +8,6 @@ import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.jsonMime import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.buildJsonObject import kotlinx.serialization.json.jsonArray @@ -24,6 +23,7 @@ import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.lang.withIOContext import java.net.URLEncoder import java.nio.charset.StandardCharsets diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt index 52c1bac53..149d2903b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt @@ -6,8 +6,6 @@ import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import logcat.LogPriority @@ -15,6 +13,8 @@ import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy const val READLIST_API = "/api/v1/readlists" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.kt index 50a88011a..929bd1b86 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.kt @@ -13,7 +13,6 @@ import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.PUT import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.add @@ -29,6 +28,7 @@ import logcat.LogPriority import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy class MangaUpdatesApi( diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt index 9cbeb2b2f..51c411357 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt @@ -10,7 +10,6 @@ import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs import eu.kanade.tachiyomi.util.PkceUtil -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.serialization.json.JsonObject @@ -27,6 +26,7 @@ import okhttp3.Headers import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody +import tachiyomi.core.util.lang.withIOContext import java.text.SimpleDateFormat import java.util.Locale diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt index 7cbde2e4d..2d16a10dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt @@ -9,7 +9,6 @@ import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.jsonMime import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.serialization.json.JsonArray import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.buildJsonObject @@ -24,6 +23,7 @@ import kotlinx.serialization.json.putJsonObject import okhttp3.FormBody import okhttp3.OkHttpClient import okhttp3.RequestBody.Companion.toRequestBody +import tachiyomi.core.util.lang.withIOContext class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInterceptor) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt index edc6d7e60..4107cd804 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt @@ -10,12 +10,12 @@ import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.PUT import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import okhttp3.Credentials import okhttp3.Dns import okhttp3.FormBody import okhttp3.Headers import okhttp3.OkHttpClient +import tachiyomi.core.util.lang.withIOContext import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt index 617529d7e..0cd157621 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt @@ -2,14 +2,14 @@ package eu.kanade.tachiyomi.data.updater import android.content.Context import eu.kanade.tachiyomi.BuildConfig -import eu.kanade.tachiyomi.core.preference.Preference -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext import eu.kanade.tachiyomi.util.system.isInstalledFromFDroid +import tachiyomi.core.preference.Preference +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.util.lang.withIOContext import uy.kohesive.injekt.injectLazy import java.util.Date import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt index 602c173ec..776061ca8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt @@ -9,9 +9,9 @@ import androidx.work.PeriodicWorkRequestBuilder import androidx.work.WorkManager import androidx.work.WorkerParameters import eu.kanade.tachiyomi.BuildConfig -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.coroutineScope import logcat.LogPriority +import tachiyomi.core.util.system.logcat import java.util.concurrent.TimeUnit class AppUpdateJob(private val context: Context, workerParams: WorkerParameters) : diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt index ad1f5d557..d67dab7be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt @@ -15,18 +15,18 @@ import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.ProgressListener import eu.kanade.tachiyomi.network.await import eu.kanade.tachiyomi.network.newCachelessCallWithProgress -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.storage.getUriCompat import eu.kanade.tachiyomi.util.storage.saveTo import eu.kanade.tachiyomi.util.system.acquireWakeLock import eu.kanade.tachiyomi.util.system.isServiceRunning -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CancellationException import kotlinx.coroutines.Job import logcat.LogPriority import okhttp3.Call import okhttp3.internal.http2.ErrorCode import okhttp3.internal.http2.StreamResetException +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt index 1fb87e79f..b5f4d45c1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt @@ -12,16 +12,16 @@ import eu.kanade.tachiyomi.extension.model.LoadResult import eu.kanade.tachiyomi.extension.util.ExtensionInstallReceiver import eu.kanade.tachiyomi.extension.util.ExtensionInstaller import eu.kanade.tachiyomi.extension.util.ExtensionLoader -import eu.kanade.tachiyomi.util.lang.launchNow -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.preference.plusAssign -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.async import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import logcat.LogPriority import rx.Observable +import tachiyomi.core.util.lang.launchNow +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.source.model.SourceData import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt index f0a02954f..6713ad712 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt @@ -15,10 +15,10 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.notification.NotificationReceiver import eu.kanade.tachiyomi.data.notification.Notifications import eu.kanade.tachiyomi.extension.api.ExtensionGithubApi -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.notification import kotlinx.coroutines.coroutineScope import logcat.LogPriority +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt index 3ef6a99e6..d83d53bfa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt @@ -1,8 +1,6 @@ package eu.kanade.tachiyomi.extension.api import android.content.Context -import eu.kanade.tachiyomi.core.preference.Preference -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.extension.ExtensionManager import eu.kanade.tachiyomi.extension.model.AvailableSources import eu.kanade.tachiyomi.extension.model.Extension @@ -12,10 +10,12 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.network.parseAs -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.serialization.Serializable import logcat.LogPriority +import tachiyomi.core.preference.Preference +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy import java.util.Date import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt index c8ee92aab..0b6b3e724 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt @@ -12,8 +12,8 @@ import eu.kanade.tachiyomi.extension.model.InstallStep import eu.kanade.tachiyomi.util.lang.use import eu.kanade.tachiyomi.util.system.getParcelableExtraCompat import eu.kanade.tachiyomi.util.system.getUriSize -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat class PackageInstallerInstaller(private val service: Service) : Installer(service) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt index 68311c1fb..cf03f3f37 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/ShizukuInstaller.kt @@ -6,7 +6,6 @@ import android.os.Build import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.InstallStep import eu.kanade.tachiyomi.util.system.getUriSize -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -15,6 +14,7 @@ import kotlinx.coroutines.cancel import kotlinx.coroutines.launch import logcat.LogPriority import rikka.shizuku.Shizuku +import tachiyomi.core.util.system.logcat import java.io.BufferedReader import java.io.InputStream diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallReceiver.kt index 76c276dac..80d240ee0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallReceiver.kt @@ -6,13 +6,13 @@ import android.content.Intent import android.content.IntentFilter import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.LoadResult -import eu.kanade.tachiyomi.util.lang.launchNow -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.async import logcat.LogPriority +import tachiyomi.core.util.lang.launchNow +import tachiyomi.core.util.system.logcat /** * Broadcast receiver that listens for the system's packages installed, updated or removed, and only diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt index 8a787b548..45368c2b4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt @@ -13,9 +13,9 @@ import eu.kanade.tachiyomi.extension.installer.PackageInstallerInstaller import eu.kanade.tachiyomi.extension.installer.ShizukuInstaller import eu.kanade.tachiyomi.extension.util.ExtensionInstaller.Companion.EXTRA_DOWNLOAD_ID import eu.kanade.tachiyomi.util.system.getSerializableExtraCompat -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.notificationBuilder import logcat.LogPriority +import tachiyomi.core.util.system.logcat class ExtensionInstallService : Service() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt index 0e7bb0c37..c63d6bf2f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt @@ -17,10 +17,10 @@ import eu.kanade.tachiyomi.extension.installer.Installer import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.InstallStep import eu.kanade.tachiyomi.util.storage.getUriCompat -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority import rx.Observable import rx.android.schedulers.AndroidSchedulers +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt index 8fcbc88c9..7ecb4bd52 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt @@ -15,10 +15,10 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.util.lang.Hash import eu.kanade.tachiyomi.util.system.getApplicationIcon -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.async import kotlinx.coroutines.runBlocking import logcat.LogPriority +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index b1a48e6f7..03ad7c22a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -14,11 +14,9 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.chapter.ChapterRecognition import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder -import eu.kanade.tachiyomi.util.lang.withIOContext import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.EpubFile import eu.kanade.tachiyomi.util.system.ImageUtil -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.runBlocking import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json @@ -27,6 +25,8 @@ import logcat.LogPriority import nl.adaptivity.xmlutil.AndroidXmlReader import nl.adaptivity.xmlutil.serialization.XML import rx.Observable +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy import java.io.File import java.io.FileInputStream diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreenModel.kt index d5a93bd76..d77ed3920 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreenModel.kt @@ -6,7 +6,6 @@ import cafe.adriel.voyager.core.model.coroutineScope import eu.kanade.domain.extension.interactor.GetExtensionLanguages import eu.kanade.domain.source.interactor.ToggleLanguage import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch @@ -16,6 +15,7 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionsScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionsScreenModel.kt index 560aaf119..f701cb27d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionsScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionsScreenModel.kt @@ -12,7 +12,6 @@ import eu.kanade.tachiyomi.extension.ExtensionManager import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.InstallStep import eu.kanade.tachiyomi.source.online.HttpSource -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.system.LocaleHelper import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow @@ -25,6 +24,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.update import rx.Observable +import tachiyomi.core.util.lang.launchIO import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import kotlin.time.Duration.Companion.seconds diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreenModel.kt index fc2109d2b..1cdf9c16d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreenModel.kt @@ -12,7 +12,6 @@ import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.system.LocaleHelper -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch @@ -23,6 +22,7 @@ import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority import okhttp3.HttpUrl.Companion.toHttpUrl +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreenModel.kt index 7f473c1d0..a7cd49bd1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreenModel.kt @@ -6,7 +6,6 @@ import cafe.adriel.voyager.core.model.coroutineScope import eu.kanade.domain.manga.interactor.GetFavorites import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch @@ -16,6 +15,7 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get 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 ae5a5e484..2da62f722 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 @@ -37,8 +37,6 @@ import eu.kanade.domain.track.interactor.GetTracks import eu.kanade.domain.track.interactor.InsertTrack import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.core.preference.Preference -import eu.kanade.tachiyomi.core.preference.PreferenceStore import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.track.EnhancedTrackService import eu.kanade.tachiyomi.data.track.TrackManager @@ -46,9 +44,11 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.ui.browse.migration.MigrationFlags -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.withUIContext import kotlinx.coroutines.flow.update +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.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/migration/sources/MigrateSourceScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceScreenModel.kt index eee8c1a43..b9445b460 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceScreenModel.kt @@ -5,8 +5,6 @@ import cafe.adriel.voyager.core.model.coroutineScope import eu.kanade.domain.source.interactor.GetSourcesWithFavoriteCount import eu.kanade.domain.source.interactor.SetMigrateSorting import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.collectLatest @@ -15,6 +13,8 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.system.logcat import tachiyomi.domain.source.model.Source import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesScreenModel.kt index e571e2390..c1cac99d2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesScreenModel.kt @@ -9,14 +9,14 @@ import eu.kanade.domain.source.interactor.ToggleSource import eu.kanade.domain.source.interactor.ToggleSourcePin import eu.kanade.domain.source.service.SourcePreferences import eu.kanade.presentation.browse.SourceUiModel -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.system.logcat import tachiyomi.domain.source.model.Pin import tachiyomi.domain.source.model.Source import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt index c3d5e73a6..aa5aa3bc9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt @@ -54,11 +54,11 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreenModel.Listi import eu.kanade.tachiyomi.ui.category.CategoryScreen import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.ui.webview.WebViewScreen -import eu.kanade.tachiyomi.util.lang.launchIO import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.receiveAsFlow import tachiyomi.core.Constants +import tachiyomi.core.util.lang.launchIO data class BrowseSourceScreen( private val sourceId: Long, 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 92c515737..74bbe2a32 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 @@ -54,11 +54,7 @@ import eu.kanade.tachiyomi.ui.browse.source.filter.TextItem import eu.kanade.tachiyomi.ui.browse.source.filter.TextSectionItem import eu.kanade.tachiyomi.ui.browse.source.filter.TriStateItem import eu.kanade.tachiyomi.ui.browse.source.filter.TriStateSectionItem -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext import eu.kanade.tachiyomi.util.removeCovers -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emptyFlow @@ -70,6 +66,10 @@ import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +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.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/browse/source/globalsearch/SearchScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/SearchScreenModel.kt index c91e6599f..37977f329 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/SearchScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/SearchScreenModel.kt @@ -14,10 +14,6 @@ import eu.kanade.domain.manga.model.toSManga import eu.kanade.domain.source.service.SourcePreferences import eu.kanade.tachiyomi.extension.ExtensionManager import eu.kanade.tachiyomi.source.CatalogueSource -import eu.kanade.tachiyomi.util.lang.awaitSingle -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.asCoroutineDispatcher import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll @@ -25,6 +21,10 @@ import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import logcat.LogPriority +import tachiyomi.core.util.lang.awaitSingle +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.toMangaUpdate import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt index 37584ee4e..003a85c01 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt @@ -58,7 +58,7 @@ import eu.kanade.presentation.components.Scaffold import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.databinding.DownloadListBinding -import eu.kanade.tachiyomi.util.lang.launchUI +import tachiyomi.core.util.lang.launchUI import kotlin.math.roundToInt object DownloadQueueScreen : Screen { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreenModel.kt index 8f5ef2a98..b14f31085 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreenModel.kt @@ -10,7 +10,6 @@ import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.databinding.DownloadListBinding import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow @@ -24,6 +23,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.system.logcat 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 f2ddb2610..8a935d864 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 @@ -8,10 +8,7 @@ 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.launchIO import eu.kanade.tachiyomi.util.lang.toDateKey -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow @@ -24,6 +21,9 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +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.model.HistoryWithRelations import uy.kohesive.injekt.Injekt 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 cb774d0ae..f8f75f930 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 @@ -37,9 +37,6 @@ import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.chapter.getNextUnread -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.lang.withIOContext import eu.kanade.tachiyomi.util.removeCovers import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.TriStateGroup import kotlinx.coroutines.flow.Flow @@ -53,6 +50,9 @@ import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach 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.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/library/LibrarySettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt index 8049fe4bf..b642ce902 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt @@ -11,13 +11,13 @@ import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.track.TrackService -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.widget.ExtendedNavigationView import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.TriStateGroup.State import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job +import tachiyomi.core.util.lang.launchIO import tachiyomi.domain.category.model.Category import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibrarySort diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt index 2e12c1fbe..6aa817b9d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt @@ -48,11 +48,11 @@ import eu.kanade.tachiyomi.ui.home.HomeScreen import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.ui.reader.ReaderActivity -import eu.kanade.tachiyomi.util.lang.launchIO import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.launch +import tachiyomi.core.util.lang.launchIO import tachiyomi.domain.category.model.Category import tachiyomi.domain.library.model.LibraryManga import tachiyomi.domain.library.model.display diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 30c1bfc3d..dd81afa57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -81,7 +81,6 @@ import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.ui.more.NewUpdateScreen import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.system.isNavigationBarNeedsScrim -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.setComposeContent @@ -94,6 +93,7 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import logcat.LogPriority import tachiyomi.core.Constants +import tachiyomi.core.util.system.logcat 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/manga/MangaCoverScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaCoverScreenModel.kt index c50ba7d38..c80314b6c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaCoverScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaCoverScreenModel.kt @@ -17,14 +17,14 @@ import eu.kanade.tachiyomi.data.saver.Image import eu.kanade.tachiyomi.data.saver.ImageSaver import eu.kanade.tachiyomi.data.saver.Location import eu.kanade.tachiyomi.util.editCover -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toShareIntent import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt index ca0654291..570f8b90d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt @@ -48,13 +48,13 @@ import eu.kanade.tachiyomi.ui.home.HomeScreen import eu.kanade.tachiyomi.ui.manga.track.TrackInfoDialogHomeScreen import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.webview.WebViewScreen -import eu.kanade.tachiyomi.util.lang.withIOContext import eu.kanade.tachiyomi.util.system.copyToClipboard -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga 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 91cd483ce..e8682d11b 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 @@ -47,13 +47,8 @@ import eu.kanade.tachiyomi.ui.manga.track.TrackItem import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences import eu.kanade.tachiyomi.util.chapter.getChapterSort import eu.kanade.tachiyomi.util.chapter.getNextUnread -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.removeCovers import eu.kanade.tachiyomi.util.shouldDownloadNewChapters -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.flow.catch @@ -66,6 +61,11 @@ import kotlinx.coroutines.flow.update import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +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.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/manga/track/TrackInfoDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt index 5ff5c0af5..efde7fa62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt @@ -60,10 +60,6 @@ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.catch @@ -73,6 +69,10 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +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 uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.time.Instant diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt index d7774f8be..77412f542 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt @@ -28,13 +28,13 @@ import eu.kanade.tachiyomi.ui.category.CategoryScreen import eu.kanade.tachiyomi.ui.download.DownloadQueueScreen import eu.kanade.tachiyomi.ui.setting.SettingsScreen import eu.kanade.tachiyomi.ui.stats.StatsScreen -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.system.isInstalledFromFDroid import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.combine +import tachiyomi.core.util.lang.launchIO import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 127f90af2..1fcf8a0fe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -67,16 +67,12 @@ import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer import eu.kanade.tachiyomi.ui.reader.viewer.ReaderProgressIndicator import eu.kanade.tachiyomi.ui.reader.viewer.pager.R2LPagerViewer import eu.kanade.tachiyomi.ui.webview.WebViewActivity -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.preference.toggle import eu.kanade.tachiyomi.util.system.applySystemAnimatorScale import eu.kanade.tachiyomi.util.system.createReaderThemeContext import eu.kanade.tachiyomi.util.system.getThemeColor import eu.kanade.tachiyomi.util.system.hasDisplayCutout import eu.kanade.tachiyomi.util.system.isNightMode -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.copy @@ -94,6 +90,10 @@ import kotlinx.coroutines.flow.sample import kotlinx.coroutines.launch import logcat.LogPriority import tachiyomi.core.Constants +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.launchNonCancellable +import tachiyomi.core.util.lang.withUIContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga import uy.kohesive.injekt.injectLazy import kotlin.math.abs 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 01f1af3cd..ee164e237 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 @@ -49,15 +49,10 @@ import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType import eu.kanade.tachiyomi.util.chapter.getChapterSort import eu.kanade.tachiyomi.util.editCover import eu.kanade.tachiyomi.util.lang.byteSize -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable import eu.kanade.tachiyomi.util.lang.takeBytes -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.cacheImageDir import eu.kanade.tachiyomi.util.system.isOnline -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.CancellationException import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async @@ -75,6 +70,11 @@ import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import logcat.LogPriority +import tachiyomi.core.util.lang.launchIO +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.chapter.model.ChapterUpdate import tachiyomi.domain.history.model.HistoryUpdate import tachiyomi.domain.manga.model.Manga diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt index c5d702873..4a863d862 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt @@ -10,8 +10,8 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.reader.model.ReaderChapter -import eu.kanade.tachiyomi.util.lang.withIOContext -import eu.kanade.tachiyomi.util.system.logcat +import tachiyomi.core.util.lang.withIOContext +import tachiyomi.core.util.system.logcat import tachiyomi.domain.manga.model.Manga /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt index 780d21bf7..55bf83f3a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt @@ -6,9 +6,6 @@ import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.reader.model.ReaderChapter import eu.kanade.tachiyomi.ui.reader.model.ReaderPage -import eu.kanade.tachiyomi.util.lang.awaitSingle -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.withIOContext import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -18,6 +15,9 @@ import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.flow import kotlinx.coroutines.runInterruptible import kotlinx.coroutines.suspendCancellableCoroutine +import tachiyomi.core.util.lang.awaitSingle +import tachiyomi.core.util.lang.launchIO +import tachiyomi.core.util.lang.withIOContext import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.util.concurrent.PriorityBlockingQueue diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt index fe216f9ac..ff1fb23c4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt @@ -2,8 +2,8 @@ package eu.kanade.tachiyomi.ui.reader.model import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.ui.reader.loader.PageLoader -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.MutableStateFlow +import tachiyomi.core.util.system.logcat data class ReaderChapter(val chapter: Chapter) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt index 8d83c97f2..2695ce198 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt @@ -10,13 +10,13 @@ import androidx.core.graphics.green import androidx.core.graphics.red import androidx.core.widget.NestedScrollView import androidx.lifecycle.lifecycleScope -import eu.kanade.tachiyomi.core.preference.getAndSet import eu.kanade.tachiyomi.databinding.ReaderColorFilterSettingsBinding import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.preference.bindToPreference import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.sample +import tachiyomi.core.preference.getAndSet import uy.kohesive.injekt.injectLazy /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt index a80295ddc..d45ba7d96 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt @@ -1,9 +1,9 @@ package eu.kanade.tachiyomi.ui.reader.setting -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.preference.getEnum import eu.kanade.tachiyomi.data.preference.PreferenceValues import eu.kanade.tachiyomi.util.system.isReleaseBuildType +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.getEnum class ReaderPreferences( private val preferenceStore: PreferenceStore, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt index cc2bd8297..7c9279746 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt @@ -1,12 +1,12 @@ package eu.kanade.tachiyomi.ui.reader.viewer -import eu.kanade.tachiyomi.core.preference.Preference import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach +import tachiyomi.core.preference.Preference /** * Common configuration for all viewers. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt index 13b197970..94e8de16f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt @@ -19,9 +19,9 @@ import eu.kanade.tachiyomi.ui.reader.model.ReaderPage import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation.NavigationRegion -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy import kotlin.math.min diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt index 1c7443e57..59c5fb52b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt @@ -9,8 +9,8 @@ import eu.kanade.tachiyomi.ui.reader.model.ReaderPage import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.viewer.hasMissingChapters import eu.kanade.tachiyomi.util.system.createReaderThemeContext -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.widget.ViewPagerAdapter +import tachiyomi.core.util.system.logcat /** * Pager adapter used by this [viewer] to where [ViewerChapters] updates are posted. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt index 6b663173a..71766a2e6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.viewer.ReaderPageImageView import eu.kanade.tachiyomi.ui.reader.viewer.hasMissingChapters import eu.kanade.tachiyomi.util.system.createReaderThemeContext -import eu.kanade.tachiyomi.util.system.logcat +import tachiyomi.core.util.system.logcat /** * RecyclerView Adapter used by this [viewer] to where [ViewerChapters] updates are posted. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index 472acfbee..e25aab8a7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -20,10 +20,10 @@ import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation.NavigationRegion -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel import rx.subscriptions.CompositeSubscription +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt index 0997c12e6..b697a98d1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt @@ -8,8 +8,8 @@ import eu.kanade.tachiyomi.ui.base.activity.BaseActivity import eu.kanade.tachiyomi.ui.base.delegate.SecureActivityDelegate import eu.kanade.tachiyomi.util.system.AuthenticatorUtil import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.startAuthentication -import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.core.util.system.logcat /** * Blank activity with a BiometricPrompt. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/AnilistLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/AnilistLoginActivity.kt index 8a2281b66..001fd265d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/AnilistLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/AnilistLoginActivity.kt @@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.ui.setting.track import android.net.Uri import androidx.lifecycle.lifecycleScope -import eu.kanade.tachiyomi.util.lang.launchIO +import tachiyomi.core.util.lang.launchIO class AnilistLoginActivity : BaseOAuthLoginActivity() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BangumiLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BangumiLoginActivity.kt index ed0c9bbef..b1bea5d7a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BangumiLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BangumiLoginActivity.kt @@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.ui.setting.track import android.net.Uri import androidx.lifecycle.lifecycleScope -import eu.kanade.tachiyomi.util.lang.launchIO +import tachiyomi.core.util.lang.launchIO class BangumiLoginActivity : BaseOAuthLoginActivity() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/MyAnimeListLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/MyAnimeListLoginActivity.kt index 2dac81b75..8b33a8fab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/MyAnimeListLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/MyAnimeListLoginActivity.kt @@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.ui.setting.track import android.net.Uri import androidx.lifecycle.lifecycleScope -import eu.kanade.tachiyomi.util.lang.launchIO +import tachiyomi.core.util.lang.launchIO class MyAnimeListLoginActivity : BaseOAuthLoginActivity() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/ShikimoriLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/ShikimoriLoginActivity.kt index bfb75c999..a5884bbc6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/ShikimoriLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/ShikimoriLoginActivity.kt @@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.ui.setting.track import android.net.Uri import androidx.lifecycle.lifecycleScope -import eu.kanade.tachiyomi.util.lang.launchIO +import tachiyomi.core.util.lang.launchIO class ShikimoriLoginActivity : BaseOAuthLoginActivity() { 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 7a53e046e..cc112675b 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 @@ -20,8 +20,8 @@ import eu.kanade.tachiyomi.data.preference.MANGA_NON_COMPLETED import eu.kanade.tachiyomi.data.preference.MANGA_NON_READ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.util.lang.launchIO import kotlinx.coroutines.flow.update +import tachiyomi.core.util.lang.launchIO 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 a35cc0c91..494f44539 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 @@ -26,11 +26,8 @@ import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.library.LibraryUpdateService import eu.kanade.tachiyomi.source.SourceManager -import eu.kanade.tachiyomi.util.lang.launchIO -import eu.kanade.tachiyomi.util.lang.launchNonCancellable import eu.kanade.tachiyomi.util.lang.toDateKey import eu.kanade.tachiyomi.util.lang.toRelativeString -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch @@ -42,6 +39,9 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import logcat.LogPriority +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.model.UpdatesWithRelations import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index 337ca5939..12ae05714 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -13,12 +13,12 @@ import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.base.activity.BaseActivity import eu.kanade.tachiyomi.util.system.WebViewUtil -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.setComposeContent import okhttp3.HttpUrl.Companion.toHttpUrl +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.injectLazy class WebViewActivity : BaseActivity() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewScreenModel.kt index 4b7f666e8..a05056086 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewScreenModel.kt @@ -7,11 +7,11 @@ import eu.kanade.presentation.more.stats.StatsScreenState import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.HttpSource -import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import okhttp3.HttpUrl.Companion.toHttpUrl +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt index e8b7f7969..9d1bf13ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt @@ -7,13 +7,13 @@ import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.notification.NotificationReceiver import eu.kanade.tachiyomi.data.notification.Notifications -import eu.kanade.tachiyomi.util.lang.withNonCancellableContext -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.storage.getUriCompat import eu.kanade.tachiyomi.util.system.createFileInCacheDir import eu.kanade.tachiyomi.util.system.notificationBuilder import eu.kanade.tachiyomi.util.system.notificationManager import eu.kanade.tachiyomi.util.system.toast +import tachiyomi.core.util.lang.withNonCancellableContext +import tachiyomi.core.util.lang.withUIContext class CrashLogUtil(private val context: Context) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt index 213c94f27..d8cf1a61f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt @@ -1,9 +1,9 @@ package eu.kanade.tachiyomi.util.preference import android.widget.CompoundButton -import eu.kanade.tachiyomi.core.preference.Preference import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.onEach +import tachiyomi.core.preference.Preference /** * Binds a checkbox or switch view with a boolean preference. diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt index 570dd440f..c51605cb6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt @@ -42,6 +42,7 @@ import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences import eu.kanade.tachiyomi.util.lang.truncateCenter import logcat.LogPriority import rikka.sui.Sui +import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.File diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt index 66db84578..e4eebbce6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt @@ -22,6 +22,7 @@ import androidx.core.graphics.green import androidx.core.graphics.red import com.hippo.unifile.UniFile import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.decoder.Format import tachiyomi.decoder.ImageDecoder import java.io.BufferedInputStream diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt index 9bfe337f1..38cdc0f19 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt @@ -16,9 +16,9 @@ import androidx.core.view.forEach import androidx.core.view.get import androidx.core.view.size import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.core.preference.Preference import eu.kanade.tachiyomi.databinding.PrefSpinnerBinding import eu.kanade.tachiyomi.util.system.getResourceColor +import tachiyomi.core.preference.Preference class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) { diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/security/SecurityPreferences.kt b/core/src/main/java/eu/kanade/tachiyomi/core/security/SecurityPreferences.kt index effe1e411..371bd776b 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/security/SecurityPreferences.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/core/security/SecurityPreferences.kt @@ -1,8 +1,8 @@ package eu.kanade.tachiyomi.core.security import eu.kanade.tachiyomi.core.R -import eu.kanade.tachiyomi.core.preference.PreferenceStore -import eu.kanade.tachiyomi.core.preference.getEnum +import tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.getEnum class SecurityPreferences( private val preferenceStore: PreferenceStore, diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/JavaScriptEngine.kt b/core/src/main/java/eu/kanade/tachiyomi/network/JavaScriptEngine.kt index e3e3577cc..3517d1dc9 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/JavaScriptEngine.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/JavaScriptEngine.kt @@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.network import android.content.Context import app.cash.quickjs.QuickJs -import eu.kanade.tachiyomi.util.lang.withIOContext +import tachiyomi.core.util.lang.withIOContext /** * Util for evaluating JavaScript in sources. diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/NetworkPreferences.kt b/core/src/main/java/eu/kanade/tachiyomi/network/NetworkPreferences.kt index c184bd250..bf6b5fc1d 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/NetworkPreferences.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/NetworkPreferences.kt @@ -1,7 +1,7 @@ package eu.kanade.tachiyomi.network -import eu.kanade.tachiyomi.core.preference.Preference -import eu.kanade.tachiyomi.core.preference.PreferenceStore +import tachiyomi.core.preference.Preference +import tachiyomi.core.preference.PreferenceStore class NetworkPreferences( private val preferenceStore: PreferenceStore, diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/WebViewInterceptor.kt b/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/WebViewInterceptor.kt index 9ebe92965..70436ad27 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/WebViewInterceptor.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/WebViewInterceptor.kt @@ -7,7 +7,6 @@ import android.webkit.WebView import android.widget.Toast import eu.kanade.tachiyomi.core.R import eu.kanade.tachiyomi.network.NetworkHelper -import eu.kanade.tachiyomi.util.lang.launchUI import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.WebViewUtil import eu.kanade.tachiyomi.util.system.setDefaultSettings @@ -16,6 +15,7 @@ import okhttp3.Headers import okhttp3.Interceptor import okhttp3.Request import okhttp3.Response +import tachiyomi.core.util.lang.launchUI import uy.kohesive.injekt.injectLazy import java.util.Locale import java.util.concurrent.CountDownLatch diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/system/DeviceUtil.kt b/core/src/main/java/eu/kanade/tachiyomi/util/system/DeviceUtil.kt index 5926d0450..7f3f6eaaf 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/system/DeviceUtil.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/util/system/DeviceUtil.kt @@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.util.system import android.annotation.SuppressLint import android.os.Build import logcat.LogPriority +import tachiyomi.core.util.system.logcat object DeviceUtil { diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/system/WebViewUtil.kt b/core/src/main/java/eu/kanade/tachiyomi/util/system/WebViewUtil.kt index f7acc58f0..1ab799228 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/system/WebViewUtil.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/util/system/WebViewUtil.kt @@ -7,6 +7,7 @@ import android.webkit.CookieManager import android.webkit.WebSettings import android.webkit.WebView import logcat.LogPriority +import tachiyomi.core.util.system.logcat object WebViewUtil { const val SPOOF_PACKAGE_NAME = "org.chromium.chrome" diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreference.kt b/core/src/main/java/tachiyomi/core/preference/AndroidPreference.kt similarity index 99% rename from core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreference.kt rename to core/src/main/java/tachiyomi/core/preference/AndroidPreference.kt index 05d63ee18..00f3701d0 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreference.kt +++ b/core/src/main/java/tachiyomi/core/preference/AndroidPreference.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.preference +package tachiyomi.core.preference import android.content.SharedPreferences import android.content.SharedPreferences.Editor diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreferenceStore.kt b/core/src/main/java/tachiyomi/core/preference/AndroidPreferenceStore.kt similarity index 79% rename from core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreferenceStore.kt rename to core/src/main/java/tachiyomi/core/preference/AndroidPreferenceStore.kt index f028148d2..74c2872d8 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/preference/AndroidPreferenceStore.kt +++ b/core/src/main/java/tachiyomi/core/preference/AndroidPreferenceStore.kt @@ -1,17 +1,17 @@ -package eu.kanade.tachiyomi.core.preference +package tachiyomi.core.preference import android.content.Context import android.content.SharedPreferences import androidx.preference.PreferenceManager -import eu.kanade.tachiyomi.core.preference.AndroidPreference.BooleanPrimitive -import eu.kanade.tachiyomi.core.preference.AndroidPreference.FloatPrimitive -import eu.kanade.tachiyomi.core.preference.AndroidPreference.IntPrimitive -import eu.kanade.tachiyomi.core.preference.AndroidPreference.LongPrimitive -import eu.kanade.tachiyomi.core.preference.AndroidPreference.Object -import eu.kanade.tachiyomi.core.preference.AndroidPreference.StringPrimitive -import eu.kanade.tachiyomi.core.preference.AndroidPreference.StringSetPrimitive import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.callbackFlow +import tachiyomi.core.preference.AndroidPreference.BooleanPrimitive +import tachiyomi.core.preference.AndroidPreference.FloatPrimitive +import tachiyomi.core.preference.AndroidPreference.IntPrimitive +import tachiyomi.core.preference.AndroidPreference.LongPrimitive +import tachiyomi.core.preference.AndroidPreference.Object +import tachiyomi.core.preference.AndroidPreference.StringPrimitive +import tachiyomi.core.preference.AndroidPreference.StringSetPrimitive class AndroidPreferenceStore( context: Context, diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/preference/Preference.kt b/core/src/main/java/tachiyomi/core/preference/Preference.kt similarity index 91% rename from core/src/main/java/eu/kanade/tachiyomi/core/preference/Preference.kt rename to core/src/main/java/tachiyomi/core/preference/Preference.kt index dc898f4d8..c276141e9 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/preference/Preference.kt +++ b/core/src/main/java/tachiyomi/core/preference/Preference.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.preference +package tachiyomi.core.preference import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/preference/PreferenceStore.kt b/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt similarity index 96% rename from core/src/main/java/eu/kanade/tachiyomi/core/preference/PreferenceStore.kt rename to core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt index c4a1abe83..f8cc9f890 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/preference/PreferenceStore.kt +++ b/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.preference +package tachiyomi.core.preference interface PreferenceStore { diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidBackupFolderProvider.kt b/core/src/main/java/tachiyomi/core/provider/AndroidBackupFolderProvider.kt similarity index 93% rename from core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidBackupFolderProvider.kt rename to core/src/main/java/tachiyomi/core/provider/AndroidBackupFolderProvider.kt index d9d0a0201..aa87b930d 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidBackupFolderProvider.kt +++ b/core/src/main/java/tachiyomi/core/provider/AndroidBackupFolderProvider.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.provider +package tachiyomi.core.provider import android.content.Context import android.os.Environment diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt b/core/src/main/java/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt similarity index 93% rename from core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt rename to core/src/main/java/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt index 267ddc7ee..042a586c2 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt +++ b/core/src/main/java/tachiyomi/core/provider/AndroidDownloadFolderProvider.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.provider +package tachiyomi.core.provider import android.content.Context import android.os.Environment diff --git a/core/src/main/java/eu/kanade/tachiyomi/core/provider/FolderProvider.kt b/core/src/main/java/tachiyomi/core/provider/FolderProvider.kt similarity index 70% rename from core/src/main/java/eu/kanade/tachiyomi/core/provider/FolderProvider.kt rename to core/src/main/java/tachiyomi/core/provider/FolderProvider.kt index 167e04e6b..b4e124cee 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/core/provider/FolderProvider.kt +++ b/core/src/main/java/tachiyomi/core/provider/FolderProvider.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.core.provider +package tachiyomi.core.provider import java.io.File diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/BooleanExtensions.kt b/core/src/main/java/tachiyomi/core/util/lang/BooleanExtensions.kt similarity index 57% rename from core/src/main/java/eu/kanade/tachiyomi/util/BooleanExtensions.kt rename to core/src/main/java/tachiyomi/core/util/lang/BooleanExtensions.kt index 07c801926..853499550 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/BooleanExtensions.kt +++ b/core/src/main/java/tachiyomi/core/util/lang/BooleanExtensions.kt @@ -1,3 +1,3 @@ -package eu.kanade.tachiyomi.util +package tachiyomi.core.util.lang fun Boolean.toLong() = if (this) 1L else 0L diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/lang/CoroutinesExtensions.kt b/core/src/main/java/tachiyomi/core/util/lang/CoroutinesExtensions.kt similarity index 98% rename from core/src/main/java/eu/kanade/tachiyomi/util/lang/CoroutinesExtensions.kt rename to core/src/main/java/tachiyomi/core/util/lang/CoroutinesExtensions.kt index 41d697024..4573b2d85 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/lang/CoroutinesExtensions.kt +++ b/core/src/main/java/tachiyomi/core/util/lang/CoroutinesExtensions.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.util.lang +package tachiyomi.core.util.lang import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt b/core/src/main/java/tachiyomi/core/util/lang/RxCoroutineBridge.kt similarity index 98% rename from core/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt rename to core/src/main/java/tachiyomi/core/util/lang/RxCoroutineBridge.kt index 0a80e8485..8cba4caac 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt +++ b/core/src/main/java/tachiyomi/core/util/lang/RxCoroutineBridge.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.util.lang +package tachiyomi.core.util.lang import kotlinx.coroutines.CancellableContinuation import kotlinx.coroutines.CancellationException diff --git a/core/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt b/core/src/main/java/tachiyomi/core/util/system/LogcatExtensions.kt similarity index 90% rename from core/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt rename to core/src/main/java/tachiyomi/core/util/system/LogcatExtensions.kt index 5e2e9c525..fb587b07d 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt +++ b/core/src/main/java/tachiyomi/core/util/system/LogcatExtensions.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.util.system +package tachiyomi.core.util.system import logcat.LogPriority import logcat.asLog diff --git a/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt index 259787466..69060ecb4 100644 --- a/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt @@ -1,9 +1,9 @@ package tachiyomi.data.chapter -import eu.kanade.tachiyomi.util.system.logcat -import eu.kanade.tachiyomi.util.toLong import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.core.util.lang.toLong +import tachiyomi.core.util.system.logcat import tachiyomi.data.DatabaseHandler import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.ChapterUpdate diff --git a/data/src/main/java/tachiyomi/data/history/HistoryRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/history/HistoryRepositoryImpl.kt index b7d00af1d..f13569693 100644 --- a/data/src/main/java/tachiyomi/data/history/HistoryRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/history/HistoryRepositoryImpl.kt @@ -1,8 +1,8 @@ package tachiyomi.data.history -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.core.util.system.logcat import tachiyomi.data.DatabaseHandler import tachiyomi.domain.history.model.HistoryUpdate import tachiyomi.domain.history.model.HistoryWithRelations diff --git a/data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt index 320759583..25b5f59e7 100644 --- a/data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt @@ -1,9 +1,9 @@ package tachiyomi.data.manga -import eu.kanade.tachiyomi.util.system.logcat -import eu.kanade.tachiyomi.util.toLong import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.core.util.lang.toLong +import tachiyomi.core.util.system.logcat import tachiyomi.data.DatabaseHandler import tachiyomi.data.listOfStringsAdapter import tachiyomi.data.updateStrategyAdapter diff --git a/app/src/main/java/eu/kanade/data/source/SourceDataRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/source/SourceDataRepositoryImpl.kt similarity index 96% rename from app/src/main/java/eu/kanade/data/source/SourceDataRepositoryImpl.kt rename to data/src/main/java/tachiyomi/data/source/SourceDataRepositoryImpl.kt index 8616d134f..1e0e3bf1a 100644 --- a/app/src/main/java/eu/kanade/data/source/SourceDataRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/source/SourceDataRepositoryImpl.kt @@ -1,4 +1,4 @@ -package eu.kanade.data.source +package tachiyomi.data.source import kotlinx.coroutines.flow.Flow import tachiyomi.data.DatabaseHandler diff --git a/data/src/main/java/tachiyomi/data/source/SourceMapper.kt b/data/src/main/java/tachiyomi/data/source/SourceMapper.kt new file mode 100644 index 000000000..416de4692 --- /dev/null +++ b/data/src/main/java/tachiyomi/data/source/SourceMapper.kt @@ -0,0 +1,7 @@ +package tachiyomi.data.source + +import tachiyomi.domain.source.model.SourceData + +val sourceDataMapper: (Long, String, String) -> SourceData = { id, lang, name -> + SourceData(id, lang, name) +} diff --git a/presentation-core/build.gradle.kts b/presentation-core/build.gradle.kts index 9dfd4731f..c8151eb05 100644 --- a/presentation-core/build.gradle.kts +++ b/presentation-core/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("com.android.library") - id("org.jetbrains.kotlin.android") + kotlin("android") } android { diff --git a/presentation-widget/build.gradle.kts b/presentation-widget/build.gradle.kts index 5553e2dcf..18972c388 100644 --- a/presentation-widget/build.gradle.kts +++ b/presentation-widget/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("com.android.library") - id("org.jetbrains.kotlin.android") + kotlin("android") } android { @@ -29,5 +29,4 @@ dependencies { implementation(androidx.glance) implementation(libs.coil.core) - } diff --git a/presentation-widget/src/main/java/tachiyomi/presentation/widget/UpdatesGridGlanceWidget.kt b/presentation-widget/src/main/java/tachiyomi/presentation/widget/UpdatesGridGlanceWidget.kt index 4465e1303..6573dbbd9 100644 --- a/presentation-widget/src/main/java/tachiyomi/presentation/widget/UpdatesGridGlanceWidget.kt +++ b/presentation-widget/src/main/java/tachiyomi/presentation/widget/UpdatesGridGlanceWidget.kt @@ -22,9 +22,9 @@ import coil.size.Precision import coil.size.Scale import coil.transform.RoundedCornersTransformation import eu.kanade.tachiyomi.core.security.SecurityPreferences -import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.system.dpToPx import kotlinx.coroutines.MainScope +import tachiyomi.core.util.lang.launchIO import tachiyomi.data.DatabaseHandler import tachiyomi.domain.manga.model.MangaCover import tachiyomi.presentation.widget.components.CoverHeight diff --git a/source-api/src/main/java/eu/kanade/tachiyomi/source/Source.kt b/source-api/src/main/java/eu/kanade/tachiyomi/source/Source.kt index 32dccbb73..62c6f5e9b 100644 --- a/source-api/src/main/java/eu/kanade/tachiyomi/source/Source.kt +++ b/source-api/src/main/java/eu/kanade/tachiyomi/source/Source.kt @@ -3,8 +3,8 @@ package eu.kanade.tachiyomi.source import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.util.lang.awaitSingle import rx.Observable +import tachiyomi.core.util.lang.awaitSingle /** * A basic interface for creating a source. It could be an online source, a local source, etc...