Skip to content

Commit

Permalink
feat(HistoryFeed): movie indication
Browse files Browse the repository at this point in the history
  • Loading branch information
urFate committed Jun 30, 2024
1 parent 5d81f31 commit 0d58431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import live.shirabox.core.model.ContentKind
import live.shirabox.shirabox.R
import java.text.SimpleDateFormat
import java.util.Date
Expand All @@ -47,6 +48,7 @@ fun PreviewCard(
title: String,
team: String,
episode: Int,
kind: ContentKind,
imagePath: String,
watchingTime: Long,
streamLength: Long,
Expand Down Expand Up @@ -125,7 +127,10 @@ fun PreviewCard(
) {
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.episode_string, episode),
text = when (kind) {
ContentKind.MOVIE -> stringResource(id = R.string.kind_movie)
else -> stringResource(id = R.string.episode_string, episode)
},
color = Color.White,
textAlign = TextAlign.End
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ internal fun HistoryFeed(
title = combinedContent.content.name,
team = entity.actingTeamName,
episode = entity.episode,
kind = combinedContent.content.kind,
imagePath = combinedContent.content.image,
watchingTime = entity.watchingTime,
streamLength = entity.videoLength ?: 1200000
Expand Down

0 comments on commit 0d58431

Please sign in to comment.