mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
update MediaHero heights and refactor SeriesHero
- Increase `MediaHero` height from 200dp to 300dp in `EpisodeScreen` and `MovieScreen`. - Replace `SeriesHero` with `MediaHero` in `SeriesScreen` and increase height to 350dp. - Remove redundant `SeriesHero` component from `SeriesComponents.kt`. - Update `SeriesViewModel` to use `ImageType.PRIMARY` for the hero image URL. - Remove comments from `MediaHero.kt`.
This commit is contained in:
@@ -70,7 +70,7 @@ private fun EpisodeScreenInternal(
|
||||
MediaHero(
|
||||
imageUrl = episode.heroImageUrl,
|
||||
backgroundColor = MaterialTheme.colorScheme.background,
|
||||
height = 200.dp,
|
||||
height = 300.dp,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
EpisodeDetails(
|
||||
|
||||
@@ -65,7 +65,7 @@ private fun MovieScreenInternal(
|
||||
MediaHero(
|
||||
imageUrl = movie.heroImageUrl,
|
||||
backgroundColor = MaterialTheme.colorScheme.background,
|
||||
height = 200.dp,
|
||||
height = 300.dp,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
MovieDetails(
|
||||
|
||||
@@ -42,7 +42,6 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
@@ -51,7 +50,6 @@ import hu.bbara.purefin.common.ui.MediaCastRow
|
||||
import hu.bbara.purefin.common.ui.MediaGhostIconButton
|
||||
import hu.bbara.purefin.common.ui.MediaMetaChip
|
||||
import hu.bbara.purefin.common.ui.components.MediaActionButton
|
||||
import hu.bbara.purefin.common.ui.components.MediaHero
|
||||
import hu.bbara.purefin.common.ui.components.PurefinAsyncImage
|
||||
|
||||
@Composable
|
||||
@@ -78,20 +76,6 @@ internal fun SeriesTopBar(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun SeriesHero(
|
||||
imageUrl: String,
|
||||
height: Dp,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
MediaHero(
|
||||
imageUrl = imageUrl,
|
||||
backgroundColor = MaterialTheme.colorScheme.background,
|
||||
height = height,
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
internal fun SeriesMetaChips(series: SeriesUiModel) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import androidx.compose.ui.unit.sp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import hu.bbara.purefin.app.content.ContentMockData
|
||||
import hu.bbara.purefin.common.ui.PurefinWaitingScreen
|
||||
import hu.bbara.purefin.common.ui.components.MediaHero
|
||||
import hu.bbara.purefin.navigation.ItemDto
|
||||
|
||||
@Composable
|
||||
@@ -71,9 +72,10 @@ private fun SeriesScreenInternal(
|
||||
.fillMaxSize()
|
||||
.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
SeriesHero(
|
||||
MediaHero(
|
||||
imageUrl = series.heroImageUrl,
|
||||
height = 200.dp,
|
||||
height = 350.dp,
|
||||
backgroundColor = MaterialTheme.colorScheme.background,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Column(
|
||||
|
||||
@@ -99,7 +99,7 @@ class SeriesViewModel @Inject constructor(
|
||||
heroImageUrl = JellyfinImageHelper.toImageUrl(
|
||||
url = serverUrl,
|
||||
itemId = seriesItemResult.id,
|
||||
type = ImageType.BACKDROP
|
||||
type = ImageType.PRIMARY
|
||||
),
|
||||
seasonTabs = seasonUiModels,
|
||||
cast = seriesItemResult.people.orEmpty().map { it.toCastMember() }
|
||||
|
||||
@@ -29,7 +29,6 @@ fun MediaHero(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
// Vertical gradient for transition to content
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.matchParentSize()
|
||||
|
||||
Reference in New Issue
Block a user