From 26e49b59405ce48a362561c750bf4465482cce4f Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Sun, 29 Dec 2024 23:01:23 +0700 Subject: [PATCH] move SourceUtil from exh to matching with upstream --- app/src/main/java/{exh/ui => eu/kanade/core/util}/SourceUtil.kt | 2 +- .../ui/browse/extension/details/SourcePreferencesScreen.kt | 2 +- .../tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt | 2 +- .../tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt | 2 +- .../kanade/tachiyomi/ui/browse/source/feed/SourceFeedScreen.kt | 2 +- .../ui/browse/source/globalsearch/GlobalSearchScreen.kt | 2 +- app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 2 +- app/src/main/java/exh/md/follows/MangaDexFollowsScreen.kt | 2 +- app/src/main/java/exh/md/similar/MangaDexSimilarScreen.kt | 2 +- app/src/main/java/exh/recs/RecommendsScreen.kt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) rename app/src/main/java/{exh/ui => eu/kanade/core/util}/SourceUtil.kt (93%) diff --git a/app/src/main/java/exh/ui/SourceUtil.kt b/app/src/main/java/eu/kanade/core/util/SourceUtil.kt similarity index 93% rename from app/src/main/java/exh/ui/SourceUtil.kt rename to app/src/main/java/eu/kanade/core/util/SourceUtil.kt index 653ea61d2b..c976e1e6ac 100644 --- a/app/src/main/java/exh/ui/SourceUtil.kt +++ b/app/src/main/java/eu/kanade/core/util/SourceUtil.kt @@ -1,4 +1,4 @@ -package exh.ui +package eu.kanade.core.util import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesScreen.kt index 2f08f074eb..fc7811db82 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesScreen.kt @@ -31,6 +31,7 @@ import androidx.preference.forEach import androidx.preference.getOnBindEditTextListener import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.util.Screen import eu.kanade.tachiyomi.R @@ -39,7 +40,6 @@ import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.source.sourcePreferences import eu.kanade.tachiyomi.widget.TachiyomiTextInputEditText.Companion.setIncognito import exh.source.EnhancedHttpSource -import exh.ui.ifSourcesLoaded import tachiyomi.domain.source.service.SourceManager import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.screens.LoadingScreen diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt index 658f475929..f921fe1815 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt @@ -13,6 +13,7 @@ import androidx.compose.ui.platform.LocalUriHandler import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.components.BrowseSourceFloatingActionButton import eu.kanade.presentation.components.AppBarActions @@ -30,7 +31,6 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.SourceFilterDialog import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.ui.webview.WebViewScreen import eu.kanade.tachiyomi.util.system.toast -import exh.ui.ifSourcesLoaded import kotlinx.collections.immutable.persistentListOf import mihon.presentation.core.util.collectAsLazyPagingItems import tachiyomi.core.common.Constants 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 8d4a15b9bf..b4fda24dee 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 @@ -36,6 +36,7 @@ import androidx.compose.ui.platform.LocalUriHandler import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.MissingSourceScreen import eu.kanade.presentation.browse.components.BrowseSourceToolbar @@ -62,7 +63,6 @@ import eu.kanade.tachiyomi.ui.webview.WebViewScreen import eu.kanade.tachiyomi.util.system.toast import exh.md.follows.MangaDexFollowsScreen import exh.source.isEhBasedSource -import exh.ui.ifSourcesLoaded import exh.ui.smartsearch.SmartSearchScreen import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.collectLatest diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/feed/SourceFeedScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/feed/SourceFeedScreen.kt index aff11b2d66..ab95229517 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/feed/SourceFeedScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/feed/SourceFeedScreen.kt @@ -14,6 +14,7 @@ import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.domain.source.model.installedExtension import eu.kanade.presentation.browse.MissingSourceScreen import eu.kanade.presentation.browse.SourceFeedOrderScreen @@ -41,7 +42,6 @@ import eu.kanade.tachiyomi.ui.webview.WebViewScreen import eu.kanade.tachiyomi.util.system.toast import exh.md.follows.MangaDexFollowsScreen import exh.source.isEhBasedSource -import exh.ui.ifSourcesLoaded import exh.util.nullIfBlank import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.source.interactor.GetRemoteManga diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt index 45b6f0dd03..dfa772c51d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchScreen.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.GlobalSearchScreen import eu.kanade.presentation.util.Screen import eu.kanade.tachiyomi.ui.browse.AddDuplicateMangaDialog @@ -22,7 +23,6 @@ import eu.kanade.tachiyomi.ui.browse.ChangeMangasCategoryDialog import eu.kanade.tachiyomi.ui.browse.RemoveMangaDialog import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreen import eu.kanade.tachiyomi.ui.manga.MangaScreen -import exh.ui.ifSourcesLoaded import tachiyomi.presentation.core.screens.LoadingScreen class GlobalSearchScreen( 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 7471bd8468..2747f65dc7 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 @@ -42,6 +42,7 @@ import dev.chrisbanes.haze.HazeDefaults import dev.chrisbanes.haze.HazeState import dev.chrisbanes.haze.HazeStyle import dev.chrisbanes.haze.hazeChild +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.domain.manga.model.hasCustomCover import eu.kanade.domain.manga.model.toSManga import eu.kanade.presentation.category.components.ChangeCategoryDialog @@ -91,7 +92,6 @@ import exh.recs.RecommendsScreen import exh.source.MERGED_SOURCE_ID import exh.source.getMainSource import exh.source.isMdBasedSource -import exh.ui.ifSourcesLoaded import exh.ui.metadata.MetadataViewScreen import exh.ui.smartsearch.SmartSearchScreen import kotlinx.coroutines.CancellationException 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 94666cafdd..ade14bf4b7 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 @@ -63,6 +63,7 @@ import com.hippo.unifile.UniFile import com.materialkolor.Contrast import com.materialkolor.dynamicColorScheme import dev.chrisbanes.insetter.applyInsetter +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.domain.base.BasePreferences import eu.kanade.domain.manga.model.readingMode import eu.kanade.domain.ui.UiPreferences @@ -110,7 +111,6 @@ import eu.kanade.tachiyomi.util.system.toShareIntent import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.setComposeContent import exh.source.isEhBasedSource -import exh.ui.ifSourcesLoaded import exh.util.defaultReaderType import exh.util.mangaType import kotlinx.collections.immutable.persistentSetOf diff --git a/app/src/main/java/exh/md/follows/MangaDexFollowsScreen.kt b/app/src/main/java/exh/md/follows/MangaDexFollowsScreen.kt index 8433ff864f..e17804a4ce 100644 --- a/app/src/main/java/exh/md/follows/MangaDexFollowsScreen.kt +++ b/app/src/main/java/exh/md/follows/MangaDexFollowsScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.components.BrowseSourceSimpleToolbar import eu.kanade.presentation.browse.components.RemoveMangaDialog @@ -28,7 +29,6 @@ import eu.kanade.tachiyomi.ui.browse.migration.advanced.design.PreMigrationScree import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreenModel import eu.kanade.tachiyomi.ui.category.CategoryScreen import eu.kanade.tachiyomi.ui.manga.MangaScreen -import exh.ui.ifSourcesLoaded import mihon.presentation.core.util.collectAsLazyPagingItems import tachiyomi.core.common.util.lang.launchIO import tachiyomi.domain.UnsortedPreferences diff --git a/app/src/main/java/exh/md/similar/MangaDexSimilarScreen.kt b/app/src/main/java/exh/md/similar/MangaDexSimilarScreen.kt index d5017fc140..531820922a 100644 --- a/app/src/main/java/exh/md/similar/MangaDexSimilarScreen.kt +++ b/app/src/main/java/exh/md/similar/MangaDexSimilarScreen.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.components.BrowseSourceSimpleToolbar import eu.kanade.presentation.components.BulkSelectionToolbar @@ -23,7 +24,6 @@ import eu.kanade.tachiyomi.ui.browse.ChangeMangaCategoryDialog import eu.kanade.tachiyomi.ui.browse.ChangeMangasCategoryDialog import eu.kanade.tachiyomi.ui.browse.RemoveMangaDialog import eu.kanade.tachiyomi.ui.manga.MangaScreen -import exh.ui.ifSourcesLoaded import mihon.presentation.core.util.collectAsLazyPagingItems import tachiyomi.domain.manga.model.Manga import tachiyomi.i18n.sy.SYMR diff --git a/app/src/main/java/exh/recs/RecommendsScreen.kt b/app/src/main/java/exh/recs/RecommendsScreen.kt index bfde6bc9d4..ea9e8e9e7b 100644 --- a/app/src/main/java/exh/recs/RecommendsScreen.kt +++ b/app/src/main/java/exh/recs/RecommendsScreen.kt @@ -13,6 +13,7 @@ import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.core.util.ifSourcesLoaded import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.components.BrowseSourceSimpleToolbar import eu.kanade.presentation.components.BulkSelectionToolbar @@ -24,7 +25,6 @@ import eu.kanade.tachiyomi.ui.browse.ChangeMangaCategoryDialog import eu.kanade.tachiyomi.ui.browse.ChangeMangasCategoryDialog import eu.kanade.tachiyomi.ui.browse.RemoveMangaDialog import eu.kanade.tachiyomi.ui.browse.source.SourcesScreen -import exh.ui.ifSourcesLoaded import mihon.presentation.core.util.collectAsLazyPagingItems import tachiyomi.domain.manga.model.Manga import tachiyomi.presentation.core.components.material.Scaffold