From df67348f246f19104faa5ed246257ef57a234927 Mon Sep 17 00:00:00 2001 From: Barnabas Balogh Date: Mon, 6 Apr 2026 12:32:10 +0200 Subject: [PATCH] refactor: remove action parameters from TvLibraryPosterSection and TvSectionHeader for cleaner UI --- .../bbara/purefin/tv/home/ui/TvHomeContent.kt | 1 - .../purefin/tv/home/ui/TvHomeSections.kt | 25 ------------------- 2 files changed, 26 deletions(-) diff --git a/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeContent.kt b/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeContent.kt index f3e1e9ac..33ed743e 100644 --- a/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeContent.kt +++ b/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeContent.kt @@ -122,7 +122,6 @@ fun TvHomeContent( TvLibraryPosterSection( title = item.name, items = libraryContent[item.id] ?: emptyList(), - action = "See All", onFocusedItem = onMediaFocused, onMovieSelected = onMovieSelected, onSeriesSelected = onSeriesSelected, diff --git a/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeSections.kt b/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeSections.kt index 6b94cca7..6a236add 100644 --- a/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeSections.kt +++ b/app-tv/src/main/java/hu/bbara/purefin/tv/home/ui/TvHomeSections.kt @@ -53,7 +53,6 @@ import org.jellyfin.sdk.model.api.BaseItemKind import org.jellyfin.sdk.model.api.ImageType private val TvHomeSectionsThumbShape = RoundedCornerShape(20.dp) -private val TvHomeSectionsPillShape = RoundedCornerShape(18.dp) private val TvHomeSectionsHorizontalPadding = 32.dp private val TvHomeSectionsRowSpacing = 18.dp private val TvHomeLandscapeCardWidth = 248.dp @@ -72,7 +71,6 @@ fun TvContinueWatchingSection( if (items.isEmpty()) return TvSectionHeader( title = "Continue Watching", - action = null ) LazyRow( modifier = modifier.fillMaxWidth(), @@ -142,7 +140,6 @@ fun TvNextUpSection( if (items.isEmpty()) return TvSectionHeader( title = "Next Up", - action = null ) LazyRow( modifier = modifier.fillMaxWidth(), @@ -183,7 +180,6 @@ fun TvNextUpSection( fun TvLibraryPosterSection( title: String, items: List, - action: String?, onFocusedItem: (FocusableItem) -> Unit = {}, firstItemFocusRequester: FocusRequester? = null, firstItemTestTag: String? = null, @@ -194,7 +190,6 @@ fun TvLibraryPosterSection( ) { TvSectionHeader( title = title, - action = action ) LazyRow( modifier = modifier.fillMaxWidth(), @@ -235,9 +230,7 @@ fun TvLibraryPosterSection( @Composable fun TvSectionHeader( title: String, - action: String?, modifier: Modifier = Modifier, - onActionClick: () -> Unit = {} ) { val scheme = MaterialTheme.colorScheme Row( @@ -253,24 +246,6 @@ fun TvSectionHeader( fontSize = 22.sp, fontWeight = FontWeight.SemiBold ) - if (action != null) { - Box( - modifier = Modifier - .clip(TvHomeSectionsPillShape) - .background(scheme.surfaceContainerHigh.copy(alpha = 0.82f)) - .border(1.dp, scheme.outlineVariant.copy(alpha = 0.6f), TvHomeSectionsPillShape) - .clickable { onActionClick() } - .padding(horizontal = 12.dp, vertical = 7.dp), - contentAlignment = Alignment.Center - ) { - Text( - text = action, - color = scheme.onSurfaceVariant, - fontSize = 12.sp, - fontWeight = FontWeight.SemiBold - ) - } - } } }