Skip to content

Commit

Permalink
fix(HistoryScreen): display unknown production string instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
urFate committed Aug 7, 2024
1 parent 7ea98ad commit cd65566
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fun History(
val contents by model.contentsFlow().collectAsState(initial = emptyList())

val currentType by remember { mutableStateOf(ContentType.ANIME) }
val unknownProduction = stringResource(id = R.string.unknown_production)

val filteredContentsByTypeAndDate by remember(currentType) {
derivedStateOf {
Expand Down Expand Up @@ -100,7 +101,7 @@ fun History(
overflow = TextOverflow.Ellipsis
)
},
supportingString = "${contentEntity.production?.let { "$it\n" }}" +
supportingString = "${contentEntity.production?.let { "$it\n" } ?: "${unknownProduction}\n"}" +
"${contentEntity.releaseYear}, ${ValuesHelper.decodeKind(contentEntity.kind, context)}",
coverImage = contentEntity.image
) {
Expand Down

0 comments on commit cd65566

Please sign in to comment.