feat: add UnwatchedEpisodeBadge and remove 'started' parameter from WatchStateBadge

This commit is contained in:
2026-05-07 19:51:28 +02:00
parent 56fe574940
commit dc5c324962
8 changed files with 48 additions and 48 deletions

View File

@@ -29,12 +29,13 @@ 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 hu.bbara.purefin.ui.common.badge.WatchStateBadge
import hu.bbara.purefin.ui.common.image.PurefinAsyncImage
import hu.bbara.purefin.core.model.EpisodeUiModel
import hu.bbara.purefin.core.model.MediaUiModel
import hu.bbara.purefin.core.model.MovieUiModel
import hu.bbara.purefin.core.model.SeriesUiModel
import hu.bbara.purefin.ui.common.badge.UnwatchedEpisodeBadge
import hu.bbara.purefin.ui.common.badge.WatchStateBadge
import hu.bbara.purefin.ui.common.image.PurefinAsyncImage
import java.util.UUID
@Composable
@@ -134,10 +135,17 @@ fun PosterCardContent(
.align(Alignment.TopEnd)
.padding(indicatorPadding),
watched = model.watched,
started = (model.progress ?: 0f) > 0f
)
}
else -> Unit
is SeriesUiModel -> {
UnwatchedEpisodeBadge(
unwatchedCount = model.unwatchedEpisodeCount,
size = 26,
modifier = Modifier
.align(Alignment.TopEnd)
.padding(indicatorPadding),
)
}
}
}
Column(

View File

@@ -304,7 +304,6 @@ private fun TvEpisodeCard(
} else {
WatchStateBadge(
watched = episode.watched,
started = (episode.progress ?: 0.0) > 0.0,
modifier = Modifier
.align(Alignment.TopEnd)
.padding(8.dp)