Simplify code in missing chapters warning (#9263)

(cherry picked from commit 0bcc22822d75e074e18387dc62b73ffa89c429d2)
This commit is contained in:
stevenyomi 2023-03-26 23:50:29 +08:00 committed by Jobobby04
parent 77dc09ff21
commit 519abe90fc

View File

@ -52,10 +52,9 @@ private fun MissingChaptersWarning(count: Int?) {
val text = when {
count == null -> stringResource(R.string.missing_chapters_unknown)
count > 0 -> pluralStringResource(id = R.plurals.missing_chapters, count = count, count)
else -> null
else -> return
}
if (text != null) {
Text(
modifier = Modifier.secondaryItemAlpha(),
text = text,
@ -64,5 +63,4 @@ private fun MissingChaptersWarning(count: Int?) {
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.error,
)
}
}