From d7d7a6d2fc7e4fda286a4a01fe31afe46309376e Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 26 Oct 2023 13:06:20 -0400 Subject: [PATCH] Revert Compose update Fixes #10069 --- .../eu/kanade/presentation/browse/BrowseSourceScreen.kt | 6 +++--- .../kanade/presentation/browse/ExtensionDetailsScreen.kt | 4 ++-- .../presentation/browse/components/BrowseSourceToolbar.kt | 4 ++-- .../browse/components/GlobalSearchResultItems.kt | 3 +-- .../presentation/browse/components/GlobalSearchToolbar.kt | 2 +- .../presentation/category/components/CategoryListItem.kt | 3 +-- .../main/java/eu/kanade/presentation/components/AppBar.kt | 7 +++++-- .../eu/kanade/presentation/components/DropdownMenu.kt | 8 ++++++-- .../java/eu/kanade/presentation/components/EmptyScreen.kt | 3 +-- .../eu/kanade/presentation/components/TabbedDialog.kt | 4 ++-- .../eu/kanade/presentation/components/TabbedScreen.kt | 4 ++-- .../kanade/presentation/library/components/LibraryTabs.kt | 4 ++-- .../manga/components/ChapterDownloadIndicator.kt | 2 +- .../manga/components/MangaBottomActionMenu.kt | 3 +-- .../main/java/eu/kanade/presentation/more/MoreScreen.kt | 6 ++---- .../java/eu/kanade/presentation/more/NewUpdateScreen.kt | 3 +-- .../more/settings/screen/SettingsMainScreen.kt | 3 +-- .../more/settings/screen/SettingsTrackingScreen.kt | 3 +-- .../java/eu/kanade/presentation/track/TrackerSearch.kt | 3 +-- .../kanade/presentation/webview/WebViewScreenContent.kt | 8 +++----- .../ui/browse/migration/sources/MigrateSourceTab.kt | 3 +-- .../kanade/tachiyomi/ui/download/DownloadQueueScreen.kt | 3 +-- .../java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt | 3 +-- gradle/compose.versions.toml | 4 ++-- 24 files changed, 44 insertions(+), 52 deletions(-) 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 f399bb5b89..833e4bf791 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/BrowseSourceScreen.kt @@ -4,7 +4,7 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline +import androidx.compose.material.icons.outlined.HelpOutline import androidx.compose.material.icons.outlined.Public import androidx.compose.material.icons.outlined.Refresh import androidx.compose.material3.SnackbarDuration @@ -79,7 +79,7 @@ fun BrowseSourceContent( listOf( EmptyScreenAction( stringResId = R.string.local_source_help_guide, - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onClick = onLocalSourceHelpClick, ), ) @@ -97,7 +97,7 @@ fun BrowseSourceContent( ), EmptyScreenAction( stringResId = R.string.label_help, - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onClick = onHelpClick, ), ) 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 715e93b52f..b319f9fdc6 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -16,7 +16,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline +import androidx.compose.material.icons.outlined.HelpOutline import androidx.compose.material.icons.outlined.History import androidx.compose.material.icons.outlined.Settings import androidx.compose.material3.AlertDialog @@ -92,7 +92,7 @@ fun ExtensionDetailsScreen( add( AppBar.Action( title = stringResource(R.string.action_faq_and_guides), - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onClick = onClickReadme, ), ) diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceToolbar.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceToolbar.kt index 4afd8c9a2f..ccea144a28 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceToolbar.kt @@ -1,7 +1,7 @@ package eu.kanade.presentation.browse.components import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ViewList +import androidx.compose.material.icons.filled.ViewList import androidx.compose.material.icons.filled.ViewModule import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarScrollBehavior @@ -56,7 +56,7 @@ fun BrowseSourceToolbar( actions = listOfNotNull( AppBar.Action( title = stringResource(R.string.action_display_mode), - icon = if (displayMode == LibraryDisplayMode.List) Icons.AutoMirrored.Filled.ViewList else Icons.Filled.ViewModule, + icon = if (displayMode == LibraryDisplayMode.List) Icons.Filled.ViewList else Icons.Filled.ViewModule, onClick = { selectingDisplayMode = true }, ), if (isLocalSource) { 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 4661c304ca..1270c011bf 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 @@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.ArrowForward import androidx.compose.material.icons.outlined.ArrowForward import androidx.compose.material.icons.outlined.Error import androidx.compose.material3.CircularProgressIndicator @@ -55,7 +54,7 @@ fun GlobalSearchResultItem( Text(text = subtitle) } IconButton(onClick = onClick) { - Icon(imageVector = Icons.AutoMirrored.Outlined.ArrowForward, contentDescription = null) + Icon(imageVector = Icons.Outlined.ArrowForward, contentDescription = null) } } content() diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt index 965894af8c..6f108abba9 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/GlobalSearchToolbar.kt @@ -58,7 +58,7 @@ fun GlobalSearchToolbar( ) if (progress in 1.. Unit, ) { Column { - PrimaryScrollableTabRow( + ScrollableTabRow( selectedTabIndex = pagerState.currentPage, edgePadding = 0.dp, indicator = { TabIndicator(it[pagerState.currentPage], pagerState.currentPageOffsetFraction) }, diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/ChapterDownloadIndicator.kt b/app/src/main/java/eu/kanade/presentation/manga/components/ChapterDownloadIndicator.kt index ce9fb64bf6..1e89317409 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/ChapterDownloadIndicator.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/ChapterDownloadIndicator.kt @@ -148,7 +148,7 @@ private fun DownloadingIndicator( MaterialTheme.colorScheme.background } CircularProgressIndicator( - progress = { animatedProgress }, + progress = animatedProgress, modifier = IndicatorModifier, color = strokeColor, strokeWidth = IndicatorSize / 2, diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt index 6f31d5a1f1..fa98e176b6 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaBottomActionMenu.kt @@ -23,7 +23,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.shape.ZeroCornerSize import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.Label import androidx.compose.material.icons.outlined.BookmarkAdd import androidx.compose.material.icons.outlined.BookmarkRemove import androidx.compose.material.icons.outlined.Delete @@ -259,7 +258,7 @@ fun LibraryBottomActionMenu( ) { Button( title = stringResource(R.string.action_move_category), - icon = Icons.AutoMirrored.Outlined.Label, + icon = Icons.Outlined.Label, toConfirm = confirm[0], onLongClick = { onLongClickItem(0) }, onClick = onChangeCategoryClicked, diff --git a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt index 5a685ccaf8..5ef863c51b 100644 --- a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt @@ -9,8 +9,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline -import androidx.compose.material.icons.automirrored.outlined.Label import androidx.compose.material.icons.outlined.CloudOff import androidx.compose.material.icons.outlined.GetApp import androidx.compose.material.icons.outlined.HelpOutline @@ -130,7 +128,7 @@ fun MoreScreen( item { TextPreferenceWidget( title = stringResource(R.string.categories), - icon = Icons.AutoMirrored.Outlined.Label, + icon = Icons.Outlined.Label, onPreferenceClick = onClickCategories, ) } @@ -168,7 +166,7 @@ fun MoreScreen( item { TextPreferenceWidget( title = stringResource(R.string.label_help), - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onPreferenceClick = { uriHandler.openUri(Constants.URL_HELP) }, ) } 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 c1480a9658..5e1c4d7ced 100644 --- a/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/NewUpdateScreen.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.OpenInNew import androidx.compose.material.icons.filled.OpenInNew import androidx.compose.material.icons.outlined.NewReleases import androidx.compose.material3.Icon @@ -61,7 +60,7 @@ fun NewUpdateScreen( ) { Text(text = stringResource(R.string.update_check_open)) Spacer(modifier = Modifier.width(MaterialTheme.padding.tiny)) - Icon(imageVector = Icons.AutoMirrored.Outlined.OpenInNew, contentDescription = null) + Icon(imageVector = Icons.Default.OpenInNew, contentDescription = null) } } } diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsMainScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsMainScreen.kt index 93e33b28bd..5f9c4e9b54 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsMainScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsMainScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.ChromeReaderMode import androidx.compose.material.icons.outlined.ChromeReaderMode import androidx.compose.material.icons.outlined.Code import androidx.compose.material.icons.outlined.CollectionsBookmark @@ -187,7 +186,7 @@ object SettingsMainScreen : Screen() { Item( titleRes = R.string.pref_category_reader, subtitleRes = R.string.pref_reader_summary, - icon = Icons.AutoMirrored.Outlined.ChromeReaderMode, + icon = Icons.Outlined.ChromeReaderMode, screen = SettingsReaderScreen, ), Item( 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 eebcaa22c8..655d79cc20 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 @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline import androidx.compose.material.icons.filled.Visibility import androidx.compose.material.icons.filled.VisibilityOff import androidx.compose.material.icons.outlined.Close @@ -73,7 +72,7 @@ object SettingsTrackingScreen : SearchableSettings { val uriHandler = LocalUriHandler.current IconButton(onClick = { uriHandler.openUri("https://tachiyomi.org/docs/guides/tracking") }) { Icon( - imageVector = Icons.AutoMirrored.Outlined.HelpOutline, + imageVector = Icons.Outlined.HelpOutline, contentDescription = stringResource(R.string.tracking_guide), ) } diff --git a/app/src/main/java/eu/kanade/presentation/track/TrackerSearch.kt b/app/src/main/java/eu/kanade/presentation/track/TrackerSearch.kt index 591d371cf8..b1c3f2844f 100644 --- a/app/src/main/java/eu/kanade/presentation/track/TrackerSearch.kt +++ b/app/src/main/java/eu/kanade/presentation/track/TrackerSearch.kt @@ -28,7 +28,6 @@ import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.ArrowBack import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material.icons.filled.Close @@ -98,7 +97,7 @@ fun TrackerSearch( navigationIcon = { IconButton(onClick = onDismissRequest) { Icon( - imageVector = Icons.AutoMirrored.Outlined.ArrowBack, + imageVector = Icons.Default.ArrowBack, contentDescription = null, tint = MaterialTheme.colorScheme.onSurfaceVariant, ) diff --git a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt index 50d387cf17..823b5bfc3a 100644 --- a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt +++ b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt @@ -11,8 +11,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.ArrowBack -import androidx.compose.material.icons.automirrored.outlined.ArrowForward import androidx.compose.material.icons.outlined.ArrowBack import androidx.compose.material.icons.outlined.ArrowForward import androidx.compose.material.icons.outlined.Close @@ -127,7 +125,7 @@ fun WebViewScreenContent( listOf( AppBar.Action( title = stringResource(R.string.action_webview_back), - icon = Icons.AutoMirrored.Outlined.ArrowBack, + icon = Icons.Outlined.ArrowBack, onClick = { if (navigator.canGoBack) { navigator.navigateBack() @@ -137,7 +135,7 @@ fun WebViewScreenContent( ), AppBar.Action( title = stringResource(R.string.action_webview_forward), - icon = Icons.AutoMirrored.Outlined.ArrowForward, + icon = Icons.Outlined.ArrowForward, onClick = { if (navigator.canGoForward) { navigator.navigateForward() @@ -188,7 +186,7 @@ fun WebViewScreenContent( .align(Alignment.BottomCenter), ) is LoadingState.Loading -> LinearProgressIndicator( - progress = { (loadingState as? LoadingState.Loading)?.progress ?: 1f }, + progress = (loadingState as? LoadingState.Loading)?.progress ?: 1f, modifier = Modifier .fillMaxWidth() .align(Alignment.BottomCenter), diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceTab.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceTab.kt index 8794c90789..fe53ccfad4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceTab.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrateSourceTab.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.ui.browse.migration.sources import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline import androidx.compose.material.icons.outlined.HelpOutline import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -30,7 +29,7 @@ fun Screen.migrateSourceTab(): TabContent { actions = listOf( AppBar.Action( title = stringResource(R.string.migration_help_guide), - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onClick = { uriHandler.openUri("https://tachiyomi.org/docs/guides/source-migration") }, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt index 0fc7f35762..dcbb4536fc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadQueueScreen.kt @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.Sort import androidx.compose.material.icons.filled.PlayArrow import androidx.compose.material.icons.outlined.Pause import androidx.compose.material.icons.outlined.Sort @@ -186,7 +185,7 @@ object DownloadQueueScreen : Screen() { listOf( AppBar.Action( title = stringResource(R.string.action_sort), - icon = Icons.AutoMirrored.Outlined.Sort, + icon = Icons.Outlined.Sort, onClick = { sortExpanded = true }, ), AppBar.OverflowAction( 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 beab688e23..5469a11a8d 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 @@ -6,7 +6,6 @@ import androidx.compose.animation.graphics.res.rememberAnimatedVectorPainter import androidx.compose.animation.graphics.vector.AnimatedImageVector import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.HelpOutline import androidx.compose.material.icons.outlined.HelpOutline import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -158,7 +157,7 @@ object LibraryTab : Tab { actions = listOf( EmptyScreenAction( stringResId = R.string.getting_started_guide, - icon = Icons.AutoMirrored.Outlined.HelpOutline, + icon = Icons.Outlined.HelpOutline, onClick = { handler.openUri("https://tachiyomi.org/docs/guides/getting-started") }, ), ), diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index ad2e6e6032..26f0809d06 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,7 +1,7 @@ [versions] compiler = "1.5.3" -compose-bom = "2023.11.00-alpha02" -accompanist = "0.33.2-alpha" +compose-bom = "2023.09.00-alpha02" +accompanist = "0.33.1-alpha" [libraries] activity = "androidx.activity:activity-compose:1.8.0"