From bfe143015a810fc42c1284ef03fbf57ff1a02395 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 18 Feb 2023 16:03:01 -0500 Subject: [PATCH] Move more components to presentation-core module --- .../eu/kanade/presentation/browse/BrowseSourceScreen.kt | 2 +- .../eu/kanade/presentation/browse/ExtensionDetailsScreen.kt | 2 +- .../java/eu/kanade/presentation/browse/ExtensionsScreen.kt | 6 +++--- .../eu/kanade/presentation/browse/GlobalSearchScreen.kt | 2 +- .../eu/kanade/presentation/browse/MigrateSourceScreen.kt | 6 +++--- .../java/eu/kanade/presentation/browse/SourcesScreen.kt | 6 +++--- .../kanade/presentation/browse/components/BaseBrowseItem.kt | 2 +- .../kanade/presentation/browse/components/BaseSourceItem.kt | 2 +- .../presentation/browse/components/GlobalSearchCardRow.kt | 2 +- .../browse/components/GlobalSearchResultItems.kt | 2 +- .../java/eu/kanade/presentation/category/CategoryScreen.kt | 4 ++-- .../presentation/category/components/CategoryContent.kt | 2 +- .../presentation/category/components/CategoryListItem.kt | 2 +- .../kanade/presentation/components/ChangeCategoryDialog.kt | 2 +- .../presentation/components/ChapterDownloadIndicator.kt | 1 + .../java/eu/kanade/presentation/components/EmptyScreen.kt | 2 +- .../java/eu/kanade/presentation/components/InfoScaffold.kt | 2 +- .../eu/kanade/presentation/components/ListGroupHeader.kt | 2 +- .../java/eu/kanade/presentation/components/WheelPicker.kt | 2 +- .../main/java/eu/kanade/presentation/crash/CrashScreen.kt | 2 +- .../java/eu/kanade/presentation/history/HistoryScreen.kt | 2 +- .../kanade/presentation/history/components/HistoryItem.kt | 2 +- .../main/java/eu/kanade/presentation/manga/MangaScreen.kt | 2 +- .../eu/kanade/presentation/manga/TrackInfoDialogSelector.kt | 2 +- .../java/eu/kanade/presentation/manga/TrackServiceSearch.kt | 4 ++-- .../presentation/manga/components/BaseMangaListItem.kt | 2 +- .../presentation/manga/components/MangaChapterListItem.kt | 4 ++-- .../kanade/presentation/manga/components/MangaInfoHeader.kt | 2 +- .../java/eu/kanade/presentation/more/NewUpdateScreen.kt | 2 +- .../more/settings/screen/ClearDatabaseScreen.kt | 2 +- .../more/settings/screen/SettingsTrackingScreen.kt | 2 +- .../more/settings/widget/AppThemePreferenceWidget.kt | 2 +- .../kanade/presentation/more/settings/widget/InfoWidget.kt | 2 +- .../eu/kanade/presentation/more/stats/StatsScreenContent.kt | 2 +- .../kanade/presentation/more/stats/components/StatsItem.kt | 4 ++-- .../presentation/more/stats/components/StatsSection.kt | 2 +- .../java/eu/kanade/presentation/updates/UpdatesScreen.kt | 2 +- .../java/eu/kanade/presentation/updates/UpdatesUiItem.kt | 4 ++-- app/src/main/java/eu/kanade/presentation/util/Modifier.kt | 1 + .../tachiyomi/ui/browse/extension/ExtensionFilterScreen.kt | 2 +- .../ui/browse/extension/details/ExtensionDetailsScreen.kt | 2 +- .../ui/browse/migration/manga/MigrationMangaScreen.kt | 2 +- .../tachiyomi/ui/browse/migration/search/MigrateDialog.kt | 2 +- .../tachiyomi/ui/browse/source/SourcesFilterScreen.kt | 2 +- .../tachiyomi/ui/browse/source/browse/BrowseSourceScreen.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/category/CategoryScreen.kt | 2 +- app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt | 4 ++-- .../main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt | 2 +- .../eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/setting/SettingsScreen.kt | 2 +- .../tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt | 2 +- .../presentation/core}/components/LoadingScreen.kt | 2 +- .../tachiyomi/presentation/core}/components/TwoPanelBox.kt | 2 +- .../presentation/core/components/material}/Constants.kt | 2 +- .../presentation/core/components/material}/IconButton.kt | 2 +- .../presentation/core/components/material}/NavigationBar.kt | 2 +- .../core/components/material}/NavigationRail.kt | 3 +-- 59 files changed, 71 insertions(+), 70 deletions(-) rename {app/src/main/java/eu/kanade/presentation => presentation-core/src/main/java/tachiyomi/presentation/core}/components/LoadingScreen.kt (91%) rename {app/src/main/java/eu/kanade/presentation => presentation-core/src/main/java/tachiyomi/presentation/core}/components/TwoPanelBox.kt (97%) rename {app/src/main/java/eu/kanade/presentation/util => presentation-core/src/main/java/tachiyomi/presentation/core/components/material}/Constants.kt (89%) rename {app/src/main/java/eu/kanade/presentation/components => presentation-core/src/main/java/tachiyomi/presentation/core/components/material}/IconButton.kt (78%) rename {app/src/main/java/eu/kanade/presentation/components => presentation-core/src/main/java/tachiyomi/presentation/core/components/material}/NavigationBar.kt (96%) rename {app/src/main/java/eu/kanade/presentation/components => presentation-core/src/main/java/tachiyomi/presentation/core/components/material}/NavigationRail.kt (96%) diff --git a/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt index 6862d85da..e9d4fe295 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt @@ -23,7 +23,6 @@ import eu.kanade.presentation.browse.components.BrowseSourceList import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.EmptyScreenAction -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.source.Source @@ -31,6 +30,7 @@ import eu.kanade.tachiyomi.source.SourceManager import kotlinx.coroutines.flow.StateFlow import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Scaffold @Composable diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt index 350d096dd..e5daf2ace 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -52,7 +52,6 @@ import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.components.WarningBanner import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget import eu.kanade.presentation.more.settings.widget.TrailingWidgetBuffer -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.source.ConfigurableSource @@ -61,6 +60,7 @@ import eu.kanade.tachiyomi.util.system.LocaleHelper import tachiyomi.presentation.core.components.material.DIVIDER_ALPHA import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding @Composable fun ExtensionDetailsScreen( diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt index 9ed87ff41..780383bbb 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt @@ -39,20 +39,20 @@ import eu.kanade.presentation.browse.components.BaseBrowseItem import eu.kanade.presentation.browse.components.ExtensionIcon import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.FastScrollLazyColumn -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.manga.components.DotSeparatorNoSpaceText import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus import eu.kanade.presentation.util.secondaryItemAlpha -import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.InstallStep import eu.kanade.tachiyomi.ui.browse.extension.ExtensionUiModel import eu.kanade.tachiyomi.ui.browse.extension.ExtensionsState import eu.kanade.tachiyomi.util.system.LocaleHelper +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.PullRefresh +import tachiyomi.presentation.core.components.material.padding +import tachiyomi.presentation.core.components.material.topSmallPaddingValues @Composable fun ExtensionScreen( diff --git a/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt index 8cd6926d5..67add4512 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt @@ -14,7 +14,6 @@ import eu.kanade.presentation.browse.components.GlobalSearchLoadingResultItem import eu.kanade.presentation.browse.components.GlobalSearchResultItem import eu.kanade.presentation.browse.components.GlobalSearchToolbar import eu.kanade.presentation.components.LazyColumn -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.CatalogueSource import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchState @@ -22,6 +21,7 @@ import eu.kanade.tachiyomi.ui.browse.source.globalsearch.SearchItemResult import eu.kanade.tachiyomi.util.system.LocaleHelper import tachiyomi.domain.manga.model.Manga import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding @Composable fun GlobalSearchScreen( diff --git a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt index deaf28d4a..2c413460b 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt @@ -26,20 +26,20 @@ import eu.kanade.domain.source.interactor.SetMigrateSorting import eu.kanade.presentation.browse.components.BaseSourceItem import eu.kanade.presentation.browse.components.SourceIcon import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.components.Scroller.STICKY_HEADER_KEY_PREFIX import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus import eu.kanade.presentation.util.secondaryItemAlpha -import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.migration.sources.MigrateSourceState import eu.kanade.tachiyomi.util.system.copyToClipboard import tachiyomi.domain.source.model.Source import tachiyomi.presentation.core.components.Badge import tachiyomi.presentation.core.components.BadgeGroup +import tachiyomi.presentation.core.components.LoadingScreen +import tachiyomi.presentation.core.components.material.padding +import tachiyomi.presentation.core.components.material.topSmallPaddingValues @Composable fun MigrateSourceScreen( diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt index 7fb065785..072497140 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt @@ -23,12 +23,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import eu.kanade.presentation.browse.components.BaseSourceItem import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.ScrollbarLazyColumn import eu.kanade.presentation.theme.header -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus -import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.browse.source.SourcesState @@ -36,6 +33,9 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreenModel.Listi import eu.kanade.tachiyomi.util.system.LocaleHelper import tachiyomi.domain.source.model.Pin import tachiyomi.domain.source.model.Source +import tachiyomi.presentation.core.components.LoadingScreen +import tachiyomi.presentation.core.components.material.padding +import tachiyomi.presentation.core.components.material.topSmallPaddingValues @Composable fun SourcesScreen( diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt index f5f669a7c..5748bab39 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BaseBrowseItem.kt @@ -8,7 +8,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import eu.kanade.presentation.util.padding +import tachiyomi.presentation.core.components.material.padding @Composable fun BaseBrowseItem( diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt index e5cc18ba3..4eda46d26 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt @@ -9,10 +9,10 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.style.TextOverflow -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.util.system.LocaleHelper import tachiyomi.domain.source.model.Source +import tachiyomi.presentation.core.components.material.padding @Composable fun BaseSourceItem( diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt index 0bd25cd23..03d5df9e9 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchCardRow.kt @@ -8,9 +8,9 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.compose.runtime.getValue -import eu.kanade.presentation.util.padding import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.asMangaCover +import tachiyomi.presentation.core.components.material.padding @Composable fun GlobalSearchCardRow( diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchResultItems.kt b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchResultItems.kt index f1b3c9a53..8472ad657 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchResultItems.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchResultItems.kt @@ -24,8 +24,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.material.padding @Composable fun GlobalSearchResultItem( diff --git a/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt b/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt index 0226f506d..9d38bb157 100644 --- a/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt @@ -11,13 +11,13 @@ import eu.kanade.presentation.category.components.CategoryContent import eu.kanade.presentation.category.components.CategoryFloatingActionButton import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus -import eu.kanade.presentation.util.topSmallPaddingValues import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.category.CategoryScreenState import tachiyomi.domain.category.model.Category import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding +import tachiyomi.presentation.core.components.material.topSmallPaddingValues @Composable fun CategoryScreen( diff --git a/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt b/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt index 01e579663..28d905aa4 100644 --- a/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt +++ b/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt @@ -8,8 +8,8 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import eu.kanade.presentation.components.LazyColumn -import eu.kanade.presentation.util.padding import tachiyomi.domain.category.model.Category +import tachiyomi.presentation.core.components.material.padding @Composable fun CategoryContent( diff --git a/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt b/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt index 27e2695b4..565ea7b35 100644 --- a/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/category/components/CategoryListItem.kt @@ -20,9 +20,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import tachiyomi.domain.category.model.Category +import tachiyomi.presentation.core.components.material.padding @Composable fun CategoryListItem( diff --git a/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt b/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt index b6689a068..fe8e99dd9 100644 --- a/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/components/ChangeCategoryDialog.kt @@ -23,9 +23,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import eu.kanade.core.prefs.CheckboxState import eu.kanade.presentation.category.visualName -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import tachiyomi.domain.category.model.Category +import tachiyomi.presentation.core.components.material.padding @Composable fun ChangeCategoryDialog( diff --git a/app/src/main/java/eu/kanade/presentation/components/ChapterDownloadIndicator.kt b/app/src/main/java/eu/kanade/presentation/components/ChapterDownloadIndicator.kt index 2f7d2cfc2..16b5b2d9f 100644 --- a/app/src/main/java/eu/kanade/presentation/components/ChapterDownloadIndicator.kt +++ b/app/src/main/java/eu/kanade/presentation/components/ChapterDownloadIndicator.kt @@ -35,6 +35,7 @@ import androidx.compose.ui.unit.dp import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download +import tachiyomi.presentation.core.components.material.IconButtonTokens enum class ChapterDownloadAction { START, diff --git a/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt b/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt index 2908c190e..f87572524 100644 --- a/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt @@ -27,9 +27,9 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.material.padding import kotlin.random.Random @Composable diff --git a/app/src/main/java/eu/kanade/presentation/components/InfoScaffold.kt b/app/src/main/java/eu/kanade/presentation/components/InfoScaffold.kt index e4d32ee8c..e52e7756d 100644 --- a/app/src/main/java/eu/kanade/presentation/components/InfoScaffold.kt +++ b/app/src/main/java/eu/kanade/presentation/components/InfoScaffold.kt @@ -28,9 +28,9 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding @Composable fun InfoScaffold( diff --git a/app/src/main/java/eu/kanade/presentation/components/ListGroupHeader.kt b/app/src/main/java/eu/kanade/presentation/components/ListGroupHeader.kt index dd3b7f973..f1a1b5431 100644 --- a/app/src/main/java/eu/kanade/presentation/components/ListGroupHeader.kt +++ b/app/src/main/java/eu/kanade/presentation/components/ListGroupHeader.kt @@ -6,7 +6,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight -import eu.kanade.presentation.util.padding +import tachiyomi.presentation.core.components.material.padding @Composable fun ListGroupHeader( diff --git a/app/src/main/java/eu/kanade/presentation/components/WheelPicker.kt b/app/src/main/java/eu/kanade/presentation/components/WheelPicker.kt index 7f5c731fd..628f3d157 100644 --- a/app/src/main/java/eu/kanade/presentation/components/WheelPicker.kt +++ b/app/src/main/java/eu/kanade/presentation/components/WheelPicker.kt @@ -27,10 +27,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.padding import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map +import tachiyomi.presentation.core.components.material.padding import java.text.DateFormatSymbols import java.time.LocalDate import kotlin.math.absoluteValue diff --git a/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt b/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt index 64f544d31..ada8f268f 100644 --- a/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/crash/CrashScreen.kt @@ -17,10 +17,10 @@ import androidx.compose.ui.res.stringResource import eu.kanade.presentation.components.InfoScaffold import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.CrashLogUtil import kotlinx.coroutines.launch +import tachiyomi.presentation.core.components.material.padding @Composable fun CrashScreen( diff --git a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt index 3cd4c5530..0bf4d2052 100644 --- a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt @@ -12,13 +12,13 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import eu.kanade.presentation.components.AppBarTitle import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.SearchToolbar import eu.kanade.presentation.history.components.HistoryContent import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.history.HistoryScreenModel import eu.kanade.tachiyomi.ui.history.HistoryState import tachiyomi.domain.history.model.HistoryWithRelations +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Scaffold import java.util.Date diff --git a/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt b/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt index 4c8674dc6..4cce6682d 100644 --- a/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt +++ b/app/src/main/java/eu/kanade/presentation/history/components/HistoryItem.kt @@ -21,10 +21,10 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import eu.kanade.presentation.components.MangaCover -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.lang.toTimestampString import tachiyomi.domain.history.model.HistoryWithRelations +import tachiyomi.presentation.core.components.material.padding import java.text.DecimalFormat import java.text.DecimalFormatSymbols diff --git a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt index ce3203db1..e319773ed 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt @@ -51,7 +51,6 @@ import eu.kanade.domain.manga.model.chaptersFiltered import eu.kanade.presentation.components.ChapterDownloadAction import eu.kanade.presentation.components.LazyColumn import eu.kanade.presentation.components.MangaBottomActionMenu -import eu.kanade.presentation.components.TwoPanelBox import eu.kanade.presentation.components.VerticalFastScroller import eu.kanade.presentation.manga.components.ChapterHeader import eu.kanade.presentation.manga.components.ExpandableMangaDescription @@ -72,6 +71,7 @@ import eu.kanade.tachiyomi.util.lang.toRelativeString import eu.kanade.tachiyomi.util.system.copyToClipboard import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.TwoPanelBox import tachiyomi.presentation.core.components.material.ExtendedFloatingActionButton import tachiyomi.presentation.core.components.material.PullRefresh import tachiyomi.presentation.core.components.material.Scaffold diff --git a/app/src/main/java/eu/kanade/presentation/manga/TrackInfoDialogSelector.kt b/app/src/main/java/eu/kanade/presentation/manga/TrackInfoDialogSelector.kt index 19cd4c5bc..4c37a8e08 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/TrackInfoDialogSelector.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/TrackInfoDialogSelector.kt @@ -35,10 +35,10 @@ import eu.kanade.presentation.components.WheelTextPicker import eu.kanade.presentation.util.isScrolledToEnd import eu.kanade.presentation.util.isScrolledToStart import eu.kanade.presentation.util.minimumTouchTargetSize -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import tachiyomi.presentation.core.components.material.AlertDialogContent import tachiyomi.presentation.core.components.material.Divider +import tachiyomi.presentation.core.components.material.padding import java.time.LocalDate import java.time.format.TextStyle diff --git a/app/src/main/java/eu/kanade/presentation/manga/TrackServiceSearch.kt b/app/src/main/java/eu/kanade/presentation/manga/TrackServiceSearch.kt index c7b2beb63..bc4b8ba6c 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/TrackServiceSearch.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/TrackServiceSearch.kt @@ -57,17 +57,17 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.toLowerCase import androidx.compose.ui.unit.dp import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.MangaCover import eu.kanade.presentation.components.ScrollbarLazyColumn -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.plus import eu.kanade.presentation.util.runOnEnterKeyPressed import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.model.TrackSearch +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding @Composable fun TrackServiceSearch( diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt index b6d8eae23..98e2b48a4 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt @@ -15,8 +15,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import eu.kanade.presentation.components.MangaCover -import eu.kanade.presentation.util.padding import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.material.padding @Composable fun BaseMangaListItem( diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaChapterListItem.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaChapterListItem.kt index 0f8a76ed9..3082b53df 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaChapterListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaChapterListItem.kt @@ -29,11 +29,11 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import eu.kanade.presentation.components.ChapterDownloadAction import eu.kanade.presentation.components.ChapterDownloadIndicator -import eu.kanade.presentation.util.ReadItemAlpha -import eu.kanade.presentation.util.SecondaryItemAlpha import eu.kanade.presentation.util.selectedBackground import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download +import tachiyomi.presentation.core.components.material.ReadItemAlpha +import tachiyomi.presentation.core.components.material.SecondaryItemAlpha @Composable fun MangaChapterListItem( diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt index e2a90de36..50be01fc8 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaInfoHeader.kt @@ -77,12 +77,12 @@ import eu.kanade.presentation.components.DropdownMenu import eu.kanade.presentation.components.MangaCover import eu.kanade.presentation.components.TextButton import eu.kanade.presentation.util.clickableNoIndication -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.system.copyToClipboard import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.material.padding import kotlin.math.roundToInt private val whitespaceLineRegex = Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)) diff --git a/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt b/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt index 2b08f719b..6d5976d75 100644 --- a/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt @@ -22,8 +22,8 @@ import com.halilibo.richtext.ui.string.RichTextStringStyle import eu.kanade.presentation.components.InfoScaffold import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.material.padding @Composable fun NewUpdateScreen( 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 9a79f4d76..346d6fa6f 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 @@ -40,7 +40,6 @@ import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.AppBarActions import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.FastScrollLazyColumn -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.util.selectedBackground import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.toast @@ -52,6 +51,7 @@ import tachiyomi.core.util.lang.withNonCancellableContext import tachiyomi.data.Database import tachiyomi.domain.source.model.Source import tachiyomi.domain.source.model.SourceWithCount +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold import uy.kohesive.injekt.Injekt 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 582b6efa0..1883dfe4e 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 @@ -43,7 +43,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import eu.kanade.domain.track.service.TrackPreferences import eu.kanade.presentation.more.settings.Preference -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.EnhancedTrackService import eu.kanade.tachiyomi.data.track.TrackManager @@ -57,6 +56,7 @@ 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 tachiyomi.presentation.core.components.material.padding import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt index 6a85c84c3..8a45052b9 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/AppThemePreferenceWidget.kt @@ -42,12 +42,12 @@ import eu.kanade.domain.ui.model.AppTheme import eu.kanade.presentation.components.MangaCover import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable import tachiyomi.presentation.core.components.material.DIVIDER_ALPHA +import tachiyomi.presentation.core.components.material.padding @Composable internal fun AppThemePreferenceWidget( diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/InfoWidget.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/InfoWidget.kt index 16ab3cb78..208cdb896 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/InfoWidget.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/InfoWidget.kt @@ -14,9 +14,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import eu.kanade.presentation.theme.TachiyomiTheme import eu.kanade.presentation.util.ThemePreviews -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.secondaryItemAlpha import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.material.padding @Composable internal fun InfoWidget(text: String) { diff --git a/app/src/main/java/eu/kanade/presentation/more/stats/StatsScreenContent.kt b/app/src/main/java/eu/kanade/presentation/more/stats/StatsScreenContent.kt index 1b89882b2..3a63875ef 100644 --- a/app/src/main/java/eu/kanade/presentation/more/stats/StatsScreenContent.kt +++ b/app/src/main/java/eu/kanade/presentation/more/stats/StatsScreenContent.kt @@ -19,8 +19,8 @@ import eu.kanade.presentation.more.stats.components.StatsItem import eu.kanade.presentation.more.stats.components.StatsOverviewItem import eu.kanade.presentation.more.stats.components.StatsSection import eu.kanade.presentation.more.stats.data.StatsData -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.material.padding import java.util.Locale import kotlin.time.DurationUnit import kotlin.time.toDuration diff --git a/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsItem.kt b/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsItem.kt index de2b50e81..65e01b199 100644 --- a/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsItem.kt +++ b/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsItem.kt @@ -14,8 +14,8 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign -import eu.kanade.presentation.util.SecondaryItemAlpha -import eu.kanade.presentation.util.padding +import tachiyomi.presentation.core.components.material.SecondaryItemAlpha +import tachiyomi.presentation.core.components.material.padding @Composable fun RowScope.StatsOverviewItem( diff --git a/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsSection.kt b/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsSection.kt index 2cb8fa337..329b04702 100644 --- a/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsSection.kt +++ b/app/src/main/java/eu/kanade/presentation/more/stats/components/StatsSection.kt @@ -10,7 +10,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource -import eu.kanade.presentation.util.padding +import tachiyomi.presentation.core.components.material.padding @Composable fun StatsSection( diff --git a/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt b/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt index 4764dc653..3cfd4414f 100644 --- a/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt @@ -27,7 +27,6 @@ import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.ChapterDownloadAction import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.FastScrollLazyColumn -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.MangaBottomActionMenu import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download @@ -35,6 +34,7 @@ import eu.kanade.tachiyomi.ui.updates.UpdatesItem import eu.kanade.tachiyomi.ui.updates.UpdatesState import kotlinx.coroutines.delay import kotlinx.coroutines.launch +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.PullRefresh import tachiyomi.presentation.core.components.material.Scaffold import kotlin.time.Duration.Companion.seconds diff --git a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt index 02770133d..3e80cd0c0 100644 --- a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt +++ b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt @@ -38,13 +38,13 @@ import eu.kanade.presentation.components.ChapterDownloadIndicator import eu.kanade.presentation.components.ListGroupHeader import eu.kanade.presentation.components.MangaCover import eu.kanade.presentation.manga.components.DotSeparatorText -import eu.kanade.presentation.util.ReadItemAlpha -import eu.kanade.presentation.util.padding import eu.kanade.presentation.util.selectedBackground import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.updates.UpdatesItem import tachiyomi.domain.updates.model.UpdatesWithRelations +import tachiyomi.presentation.core.components.material.ReadItemAlpha +import tachiyomi.presentation.core.components.material.padding import java.util.Date import kotlin.time.Duration.Companion.minutes diff --git a/app/src/main/java/eu/kanade/presentation/util/Modifier.kt b/app/src/main/java/eu/kanade/presentation/util/Modifier.kt index 6abf822dd..8d9a30e1e 100644 --- a/app/src/main/java/eu/kanade/presentation/util/Modifier.kt +++ b/app/src/main/java/eu/kanade/presentation/util/Modifier.kt @@ -21,6 +21,7 @@ import androidx.compose.ui.platform.LocalViewConfiguration import androidx.compose.ui.platform.debugInspectorInfo import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.DpSize +import tachiyomi.presentation.core.components.material.SecondaryItemAlpha import kotlin.math.roundToInt fun Modifier.selectedBackground(isSelected: Boolean): Modifier = composed { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreen.kt index d968155d1..a18e5a890 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterScreen.kt @@ -10,10 +10,10 @@ import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.presentation.browse.ExtensionFilterScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.collectLatest +import tachiyomi.presentation.core.components.LoadingScreen class ExtensionFilterScreen : Screen { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreen.kt index 402fc232c..355ca8daf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsScreen.kt @@ -11,8 +11,8 @@ import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.presentation.browse.ExtensionDetailsScreen -import eu.kanade.presentation.components.LoadingScreen import kotlinx.coroutines.flow.collectLatest +import tachiyomi.presentation.core.components.LoadingScreen data class ExtensionDetailsScreen( private val pkgName: String, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreen.kt index 6cc6bc4aa..5b14dab0a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaScreen.kt @@ -10,12 +10,12 @@ import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.presentation.browse.MigrateMangaScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.migration.search.MigrateSearchScreen import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.collectLatest +import tachiyomi.presentation.core.components.LoadingScreen data class MigrationMangaScreen( private val sourceId: Long, 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 bd99e253f..923c2e744 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 @@ -29,7 +29,6 @@ import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource import eu.kanade.domain.manga.interactor.UpdateManga import eu.kanade.domain.manga.model.hasCustomCover import eu.kanade.domain.manga.model.toSManga -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.track.EnhancedTrackService @@ -52,6 +51,7 @@ import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.MangaUpdate import tachiyomi.domain.track.interactor.GetTracks import tachiyomi.domain.track.interactor.InsertTrack +import tachiyomi.presentation.core.components.LoadingScreen import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.util.Date diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesFilterScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesFilterScreen.kt index 9c5b82980..02b574a87 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesFilterScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesFilterScreen.kt @@ -10,9 +10,9 @@ import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.presentation.browse.SourcesFilterScreen -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.toast +import tachiyomi.presentation.core.components.LoadingScreen class SourcesFilterScreen : Screen { 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 51fc3d28e..6ce74a607 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 @@ -45,7 +45,6 @@ import eu.kanade.presentation.browse.components.RemoveMangaDialog import eu.kanade.presentation.components.ChangeCategoryDialog import eu.kanade.presentation.components.DuplicateMangaDialog import eu.kanade.presentation.util.AssistContentScreen -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.CatalogueSource import eu.kanade.tachiyomi.source.LocalSource @@ -62,6 +61,7 @@ import tachiyomi.core.Constants import tachiyomi.core.util.lang.launchIO import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.Scaffold +import tachiyomi.presentation.core.components.material.padding data class BrowseSourceScreen( private val sourceId: Long, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreen.kt index 245c3e37c..e115f2aca 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreen.kt @@ -14,9 +14,9 @@ import eu.kanade.presentation.category.CategoryScreen import eu.kanade.presentation.category.components.CategoryCreateDialog import eu.kanade.presentation.category.components.CategoryDeleteDialog import eu.kanade.presentation.category.components.CategoryRenameDialog -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.collectLatest +import tachiyomi.presentation.core.components.LoadingScreen class CategoryScreen : Screen { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt index 475b1cf23..0fafc5a93 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt @@ -37,8 +37,6 @@ import cafe.adriel.voyager.navigator.tab.LocalTabNavigator import cafe.adriel.voyager.navigator.tab.TabNavigator import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.source.service.SourcePreferences -import eu.kanade.presentation.components.NavigationBar -import eu.kanade.presentation.components.NavigationRail import eu.kanade.presentation.util.isTabletUi import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.BrowseTab @@ -55,6 +53,8 @@ import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.launch import soup.compose.material.motion.animation.materialFadeThroughIn import soup.compose.material.motion.animation.materialFadeThroughOut +import tachiyomi.presentation.core.components.material.NavigationBar +import tachiyomi.presentation.core.components.material.NavigationRail import tachiyomi.presentation.core.components.material.Scaffold import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get 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 d94b0b642..da78ccb2a 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 @@ -34,7 +34,6 @@ import eu.kanade.presentation.components.DeleteLibraryMangaDialog import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.EmptyScreenAction import eu.kanade.presentation.components.LibraryBottomActionMenu -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.library.components.LibraryContent import eu.kanade.presentation.library.components.LibraryToolbar import eu.kanade.presentation.util.Tab @@ -55,6 +54,7 @@ import tachiyomi.domain.category.model.Category import tachiyomi.domain.library.model.LibraryManga import tachiyomi.domain.library.model.display import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Scaffold object LibraryTab : Tab { 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 e3380ea5c..895c0071b 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 @@ -26,7 +26,6 @@ import eu.kanade.domain.manga.model.hasCustomCover import eu.kanade.domain.manga.model.toSManga import eu.kanade.presentation.components.ChangeCategoryDialog import eu.kanade.presentation.components.DuplicateMangaDialog -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.components.NavigatorAdaptiveSheet import eu.kanade.presentation.manga.ChapterSettingsDialog import eu.kanade.presentation.manga.EditCoverAction @@ -56,6 +55,7 @@ import tachiyomi.core.util.lang.withIOContext import tachiyomi.core.util.system.logcat import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga +import tachiyomi.presentation.core.components.LoadingScreen class MangaScreen( private val mangaId: Long, 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 9c9d553a5..e94e48fd1 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 @@ -46,7 +46,6 @@ import eu.kanade.presentation.manga.TrackInfoDialogHome import eu.kanade.presentation.manga.TrackScoreSelector import eu.kanade.presentation.manga.TrackServiceSearch import eu.kanade.presentation.manga.TrackStatusSelector -import eu.kanade.presentation.util.padding import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Track import eu.kanade.tachiyomi.data.track.EnhancedTrackService @@ -73,6 +72,7 @@ import tachiyomi.domain.track.interactor.DeleteTrack import tachiyomi.domain.track.interactor.GetTracks import tachiyomi.domain.track.interactor.InsertTrack import tachiyomi.presentation.core.components.material.AlertDialogContent +import tachiyomi.presentation.core.components.material.padding 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/setting/SettingsScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsScreen.kt index 2ae7e3c98..0ded25b45 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsScreen.kt @@ -13,7 +13,6 @@ import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.currentOrThrow -import eu.kanade.presentation.components.TwoPanelBox import eu.kanade.presentation.more.settings.screen.AboutScreen import eu.kanade.presentation.more.settings.screen.SettingsBackupScreen import eu.kanade.presentation.more.settings.screen.SettingsGeneralScreen @@ -21,6 +20,7 @@ import eu.kanade.presentation.more.settings.screen.SettingsMainScreen import eu.kanade.presentation.util.DefaultNavigatorScreenTransition import eu.kanade.presentation.util.LocalBackPress import eu.kanade.presentation.util.isTabletUi +import tachiyomi.presentation.core.components.TwoPanelBox class SettingsScreen private constructor( val toBackup: Boolean, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt index ada06753d..fb948240c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt @@ -3,11 +3,11 @@ package eu.kanade.tachiyomi.ui.setting.track import android.content.Intent import android.net.Uri import android.os.Bundle -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.ui.base.activity.BaseActivity import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.util.view.setComposeContent +import tachiyomi.presentation.core.components.LoadingScreen import uy.kohesive.injekt.injectLazy abstract class BaseOAuthLoginActivity : BaseActivity() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt index 45795b46e..4f264f2bb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt @@ -10,10 +10,10 @@ import cafe.adriel.voyager.core.screen.uniqueScreenKey import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.presentation.components.AppBar -import eu.kanade.presentation.components.LoadingScreen import eu.kanade.presentation.more.stats.StatsScreenContent import eu.kanade.presentation.more.stats.StatsScreenState import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.material.Scaffold class StatsScreen : Screen { diff --git a/app/src/main/java/eu/kanade/presentation/components/LoadingScreen.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/LoadingScreen.kt similarity index 91% rename from app/src/main/java/eu/kanade/presentation/components/LoadingScreen.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/LoadingScreen.kt index 357858938..1b05814a7 100644 --- a/app/src/main/java/eu/kanade/presentation/components/LoadingScreen.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/LoadingScreen.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/app/src/main/java/eu/kanade/presentation/components/TwoPanelBox.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/TwoPanelBox.kt similarity index 97% rename from app/src/main/java/eu/kanade/presentation/components/TwoPanelBox.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/TwoPanelBox.kt index e9b509508..a3a97dcd1 100644 --- a/app/src/main/java/eu/kanade/presentation/components/TwoPanelBox.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/TwoPanelBox.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope diff --git a/app/src/main/java/eu/kanade/presentation/util/Constants.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Constants.kt similarity index 89% rename from app/src/main/java/eu/kanade/presentation/util/Constants.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Constants.kt index 651ad0853..32249fe5b 100644 --- a/app/src/main/java/eu/kanade/presentation/util/Constants.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Constants.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.util +package tachiyomi.presentation.core.components.material import androidx.compose.foundation.layout.PaddingValues import androidx.compose.material3.MaterialTheme diff --git a/app/src/main/java/eu/kanade/presentation/components/IconButton.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/IconButton.kt similarity index 78% rename from app/src/main/java/eu/kanade/presentation/components/IconButton.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/material/IconButton.kt index 1bd39fd13..9b9d98811 100644 --- a/app/src/main/java/eu/kanade/presentation/components/IconButton.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/IconButton.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components.material import androidx.compose.ui.unit.dp diff --git a/app/src/main/java/eu/kanade/presentation/components/NavigationBar.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationBar.kt similarity index 96% rename from app/src/main/java/eu/kanade/presentation/components/NavigationBar.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationBar.kt index 9c4143f80..2f7f431e7 100644 --- a/app/src/main/java/eu/kanade/presentation/components/NavigationBar.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationBar.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components.material import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.RowScope diff --git a/app/src/main/java/eu/kanade/presentation/components/NavigationRail.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationRail.kt similarity index 96% rename from app/src/main/java/eu/kanade/presentation/components/NavigationRail.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationRail.kt index 674560c24..02e670ca7 100644 --- a/app/src/main/java/eu/kanade/presentation/components/NavigationRail.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/NavigationRail.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components.material import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -19,7 +19,6 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import eu.kanade.presentation.util.padding /** * Center-aligned M3 Navigation rail