From 432b95182f77d2b802ed389fa72947038840b8fe Mon Sep 17 00:00:00 2001 From: Eduarda Barbosa Date: Fri, 7 Feb 2025 15:10:38 -0300 Subject: [PATCH] remove duplicated code --- .../view/folders/SuggestedFoldersPage.kt | 2 +- .../view/folders/SuggestedFoldersPaywall.kt | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPage.kt b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPage.kt index 8329c420f2f..12b406187f6 100644 --- a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPage.kt +++ b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPage.kt @@ -124,7 +124,7 @@ fun SuggestedFoldersPage( } @Composable -private fun FolderItem(folderName: String, folderColor: Color, podcastUuids: List, modifier: Modifier = Modifier) { +fun FolderItem(folderName: String, folderColor: Color, podcastUuids: List, modifier: Modifier = Modifier) { val stringResource = stringResource(LR.string.folder_content_description, folderName) FolderImage( diff --git a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt index 9df6984af50..c829d5649a8 100644 --- a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt +++ b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt @@ -27,7 +27,6 @@ import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.semantics.clearAndSetSemantics -import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview @@ -39,7 +38,6 @@ import au.com.shiftyjelly.pocketcasts.compose.buttons.RowButton import au.com.shiftyjelly.pocketcasts.compose.buttons.RowOutlinedButton import au.com.shiftyjelly.pocketcasts.compose.components.TextH30 import au.com.shiftyjelly.pocketcasts.compose.components.TextH50 -import au.com.shiftyjelly.pocketcasts.compose.folder.FolderImage import au.com.shiftyjelly.pocketcasts.compose.preview.ThemePreviewParameterProvider import au.com.shiftyjelly.pocketcasts.compose.theme import au.com.shiftyjelly.pocketcasts.ui.theme.Theme @@ -140,21 +138,6 @@ private fun Folders(podcastUuids: List, modifier: Modifier = Modifier) { } } -@Composable -private fun FolderItem(folderName: String, folderColor: Color, podcastUuids: List, modifier: Modifier = Modifier) { - val stringResource = stringResource(LR.string.folder_content_description, folderName) - - FolderImage( - name = folderName, - color = folderColor, - podcastUuids = podcastUuids, - textSpacing = true, - modifier = modifier.clearAndSetSemantics { - contentDescription = stringResource - }, - ) -} - @Preview(showBackground = true) @Composable private fun SuggestedFoldersPagePreview(@PreviewParameter(ThemePreviewParameterProvider::class) themeType: Theme.ThemeType) {