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 3cdda8a20..60bd96ca6 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt @@ -39,7 +39,6 @@ import eu.kanade.presentation.browse.components.BaseBrowseItem import eu.kanade.presentation.browse.components.ExtensionIcon import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.manga.components.DotSeparatorNoSpaceText -import eu.kanade.presentation.theme.header import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension import eu.kanade.tachiyomi.extension.model.InstallStep @@ -51,6 +50,7 @@ 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 +import tachiyomi.presentation.core.theme.header import tachiyomi.presentation.core.util.plus import tachiyomi.presentation.core.util.secondaryItemAlpha 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 1d61030b4..d19a66470 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt @@ -26,7 +26,6 @@ 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.theme.header import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.migration.sources.MigrateSourceState import eu.kanade.tachiyomi.util.system.copyToClipboard @@ -38,6 +37,7 @@ import tachiyomi.presentation.core.components.ScrollbarLazyColumn import tachiyomi.presentation.core.components.Scroller.STICKY_HEADER_KEY_PREFIX import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.components.material.topSmallPaddingValues +import tachiyomi.presentation.core.theme.header import tachiyomi.presentation.core.util.plus import tachiyomi.presentation.core.util.secondaryItemAlpha 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 f42a0e8a1..e3381b494 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt @@ -23,7 +23,6 @@ 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.theme.header import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.browse.source.SourcesState @@ -35,6 +34,7 @@ import tachiyomi.presentation.core.components.LoadingScreen import tachiyomi.presentation.core.components.ScrollbarLazyColumn import tachiyomi.presentation.core.components.material.padding import tachiyomi.presentation.core.components.material.topSmallPaddingValues +import tachiyomi.presentation.core.theme.header import tachiyomi.presentation.core.util.plus @Composable diff --git a/app/src/main/java/eu/kanade/presentation/components/dialogs/ChangeCategoryDialog.kt b/app/src/main/java/eu/kanade/presentation/category/ChangeCategoryDialog.kt similarity index 98% rename from app/src/main/java/eu/kanade/presentation/components/dialogs/ChangeCategoryDialog.kt rename to app/src/main/java/eu/kanade/presentation/category/ChangeCategoryDialog.kt index 5aaa64487..ba59308a7 100644 --- a/app/src/main/java/eu/kanade/presentation/components/dialogs/ChangeCategoryDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/category/ChangeCategoryDialog.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components.dialogs +package eu.kanade.presentation.category import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column @@ -22,7 +22,6 @@ import androidx.compose.ui.Alignment 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.tachiyomi.R import tachiyomi.domain.category.model.Category import tachiyomi.presentation.core.components.material.TextButton diff --git a/app/src/main/java/eu/kanade/presentation/components/AppBar.kt b/app/src/main/java/eu/kanade/presentation/components/AppBar.kt index 248ef7302..fa1c21794 100644 --- a/app/src/main/java/eu/kanade/presentation/components/AppBar.kt +++ b/app/src/main/java/eu/kanade/presentation/components/AppBar.kt @@ -276,18 +276,16 @@ fun SearchToolbar( visualTransformation = visualTransformation, interactionSource = interactionSource, placeholder = { - (placeholderText ?: stringResource(R.string.action_search_hint)).let { placeholderText -> - Text( - modifier = Modifier.secondaryItemAlpha(), - text = placeholderText, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - style = MaterialTheme.typography.titleMedium.copy( - fontSize = 18.sp, - fontWeight = FontWeight.Normal, - ), - ) - } + Text( + modifier = Modifier.secondaryItemAlpha(), + text = (placeholderText ?: stringResource(R.string.action_search_hint)), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + style = MaterialTheme.typography.titleMedium.copy( + fontSize = 18.sp, + fontWeight = FontWeight.Normal, + ), + ) }, ) }, diff --git a/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt b/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt index 1cce258d9..f7438e175 100644 --- a/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/components/TabbedDialog.kt @@ -31,8 +31,10 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.util.fastForEachIndexed import eu.kanade.tachiyomi.R import kotlinx.coroutines.launch +import tachiyomi.presentation.core.components.HorizontalPager import tachiyomi.presentation.core.components.material.Divider import tachiyomi.presentation.core.components.material.TabIndicator +import tachiyomi.presentation.core.components.rememberPagerState object TabbedDialogPaddings { val Horizontal = 24.dp diff --git a/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt b/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt index 5495ec927..d60a2dde2 100644 --- a/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt @@ -21,9 +21,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.res.stringResource import kotlinx.coroutines.launch +import tachiyomi.presentation.core.components.HorizontalPager import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.components.material.TabIndicator import tachiyomi.presentation.core.components.material.TabText +import tachiyomi.presentation.core.components.rememberPagerState @Composable fun TabbedScreen( diff --git a/app/src/main/java/eu/kanade/presentation/components/dialogs/DeleteLibraryMangaDialog.kt b/app/src/main/java/eu/kanade/presentation/library/DeleteLibraryMangaDialog.kt similarity index 98% rename from app/src/main/java/eu/kanade/presentation/components/dialogs/DeleteLibraryMangaDialog.kt rename to app/src/main/java/eu/kanade/presentation/library/DeleteLibraryMangaDialog.kt index cb691dcdb..2cde52c0c 100644 --- a/app/src/main/java/eu/kanade/presentation/components/dialogs/DeleteLibraryMangaDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/library/DeleteLibraryMangaDialog.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components.dialogs +package eu.kanade.presentation.library import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryContent.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryContent.kt index 1315ed2ce..3b451f36f 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryContent.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryContent.kt @@ -15,7 +15,6 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalLayoutDirection import eu.kanade.core.prefs.PreferenceMutableState -import eu.kanade.presentation.components.rememberPagerState import eu.kanade.tachiyomi.ui.library.LibraryItem import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -23,6 +22,7 @@ import tachiyomi.domain.category.model.Category import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibraryManga import tachiyomi.presentation.core.components.material.PullRefresh +import tachiyomi.presentation.core.components.rememberPagerState import kotlin.time.Duration.Companion.seconds @Composable diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryPager.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryPager.kt index e60101ba0..b286fbde5 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryPager.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryPager.kt @@ -18,12 +18,12 @@ import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.unit.dp import eu.kanade.core.prefs.PreferenceMutableState import eu.kanade.presentation.components.EmptyScreen -import eu.kanade.presentation.components.HorizontalPager -import eu.kanade.presentation.components.PagerState import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.library.LibraryItem import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibraryManga +import tachiyomi.presentation.core.components.HorizontalPager +import tachiyomi.presentation.core.components.PagerState import tachiyomi.presentation.core.util.plus @Composable diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryToolbar.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryToolbar.kt index 8c569a3b7..c5a73b6ff 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryToolbar.kt @@ -23,9 +23,9 @@ import androidx.compose.ui.unit.sp import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.OverflowMenu import eu.kanade.presentation.components.SearchToolbar -import eu.kanade.presentation.theme.active import eu.kanade.tachiyomi.R import tachiyomi.presentation.core.components.Pill +import tachiyomi.presentation.core.theme.active @Composable fun LibraryToolbar( diff --git a/app/src/main/java/eu/kanade/presentation/components/dialogs/DuplicateMangaDialog.kt b/app/src/main/java/eu/kanade/presentation/manga/DuplicateMangaDialog.kt similarity index 96% rename from app/src/main/java/eu/kanade/presentation/components/dialogs/DuplicateMangaDialog.kt rename to app/src/main/java/eu/kanade/presentation/manga/DuplicateMangaDialog.kt index edab1002d..9d2fc0577 100644 --- a/app/src/main/java/eu/kanade/presentation/components/dialogs/DuplicateMangaDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/DuplicateMangaDialog.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components.dialogs +package eu.kanade.presentation.manga import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt index 85171df81..6803a1bf6 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt @@ -29,8 +29,8 @@ import androidx.compose.ui.unit.dp import eu.kanade.presentation.components.DownloadDropdownMenu import eu.kanade.presentation.components.OverflowMenu import eu.kanade.presentation.manga.DownloadAction -import eu.kanade.presentation.theme.active import eu.kanade.tachiyomi.R +import tachiyomi.presentation.core.theme.active @Composable fun MangaToolbar( diff --git a/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt b/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt index 4a9dd6dbb..7edfb0132 100644 --- a/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt +++ b/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt @@ -9,7 +9,6 @@ import androidx.compose.ui.platform.LocalLayoutDirection import com.google.accompanist.themeadapter.material3.createMdc3Theme import eu.kanade.domain.ui.model.AppTheme import eu.kanade.tachiyomi.ui.base.delegate.ThemingDelegate -import uy.kohesive.injekt.api.get @Composable fun TachiyomiTheme(content: @Composable () -> Unit) { 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 b1425f198..a1e685160 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 @@ -42,8 +42,8 @@ import eu.kanade.presentation.browse.BrowseSourceContent import eu.kanade.presentation.browse.MissingSourceScreen import eu.kanade.presentation.browse.components.BrowseSourceToolbar import eu.kanade.presentation.browse.components.RemoveMangaDialog -import eu.kanade.presentation.components.dialogs.ChangeCategoryDialog -import eu.kanade.presentation.components.dialogs.DuplicateMangaDialog +import eu.kanade.presentation.category.ChangeCategoryDialog +import eu.kanade.presentation.manga.DuplicateMangaDialog import eu.kanade.presentation.util.AssistContentScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.CatalogueSource 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 124c0d758..0e44d2d7b 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 @@ -29,10 +29,10 @@ import cafe.adriel.voyager.navigator.currentOrThrow import cafe.adriel.voyager.navigator.tab.LocalTabNavigator import cafe.adriel.voyager.navigator.tab.TabOptions import eu.kanade.domain.manga.model.isLocal +import eu.kanade.presentation.category.ChangeCategoryDialog import eu.kanade.presentation.components.EmptyScreen import eu.kanade.presentation.components.EmptyScreenAction -import eu.kanade.presentation.components.dialogs.ChangeCategoryDialog -import eu.kanade.presentation.components.dialogs.DeleteLibraryMangaDialog +import eu.kanade.presentation.library.DeleteLibraryMangaDialog import eu.kanade.presentation.library.components.LibraryContent import eu.kanade.presentation.library.components.LibraryToolbar import eu.kanade.presentation.manga.components.LibraryBottomActionMenu 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 19c94f1a4..d02eb80a8 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 @@ -24,10 +24,10 @@ import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.currentOrThrow import eu.kanade.domain.manga.model.hasCustomCover import eu.kanade.domain.manga.model.toSManga +import eu.kanade.presentation.category.ChangeCategoryDialog import eu.kanade.presentation.components.NavigatorAdaptiveSheet -import eu.kanade.presentation.components.dialogs.ChangeCategoryDialog -import eu.kanade.presentation.components.dialogs.DuplicateMangaDialog import eu.kanade.presentation.manga.ChapterSettingsDialog +import eu.kanade.presentation.manga.DuplicateMangaDialog import eu.kanade.presentation.manga.EditCoverAction import eu.kanade.presentation.manga.MangaScreen import eu.kanade.presentation.manga.components.DeleteChaptersDialog diff --git a/app/src/main/java/eu/kanade/presentation/components/Pager.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt similarity index 98% rename from app/src/main/java/eu/kanade/presentation/components/Pager.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt index a2b980fbc..601974db4 100644 --- a/app/src/main/java/eu/kanade/presentation/components/Pager.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.components +package tachiyomi.presentation.core.components import androidx.compose.foundation.gestures.FlingBehavior import androidx.compose.foundation.gestures.Orientation @@ -31,7 +31,6 @@ import androidx.compose.ui.util.fastForEach import androidx.compose.ui.util.fastMaxBy import androidx.compose.ui.util.fastSumBy import kotlinx.coroutines.flow.distinctUntilChanged -import tachiyomi.presentation.core.components.LazyColumn @Composable fun HorizontalPager( diff --git a/app/src/main/java/eu/kanade/presentation/theme/Color.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/theme/Color.kt similarity index 88% rename from app/src/main/java/eu/kanade/presentation/theme/Color.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/theme/Color.kt index ea12448df..bb62f18cb 100644 --- a/app/src/main/java/eu/kanade/presentation/theme/Color.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/theme/Color.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.theme +package tachiyomi.presentation.core.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.ColorScheme diff --git a/app/src/main/java/eu/kanade/presentation/theme/Typography.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/theme/Typography.kt similarity index 90% rename from app/src/main/java/eu/kanade/presentation/theme/Typography.kt rename to presentation-core/src/main/java/tachiyomi/presentation/core/theme/Typography.kt index 537424e88..c875b6f1c 100644 --- a/app/src/main/java/eu/kanade/presentation/theme/Typography.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/theme/Typography.kt @@ -1,4 +1,4 @@ -package eu.kanade.presentation.theme +package tachiyomi.presentation.core.theme import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Typography