Simplify code in missing chapters warning (#9263)
This commit is contained in:
parent
1ff78173f7
commit
0bcc22822d
1 changed files with 9 additions and 11 deletions
|
@ -52,17 +52,15 @@ private fun MissingChaptersWarning(count: Int?) {
|
||||||
val text = when {
|
val text = when {
|
||||||
count == null -> stringResource(R.string.missing_chapters_unknown)
|
count == null -> stringResource(R.string.missing_chapters_unknown)
|
||||||
count > 0 -> pluralStringResource(id = R.plurals.missing_chapters, count = count, count)
|
count > 0 -> pluralStringResource(id = R.plurals.missing_chapters, count = count, count)
|
||||||
else -> null
|
else -> return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (text != null) {
|
Text(
|
||||||
Text(
|
modifier = Modifier.secondaryItemAlpha(),
|
||||||
modifier = Modifier.secondaryItemAlpha(),
|
text = text,
|
||||||
text = text,
|
maxLines = 1,
|
||||||
maxLines = 1,
|
overflow = TextOverflow.Ellipsis,
|
||||||
overflow = TextOverflow.Ellipsis,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
style = MaterialTheme.typography.bodySmall,
|
color = MaterialTheme.colorScheme.error,
|
||||||
color = MaterialTheme.colorScheme.error,
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue