mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Simplify code in missing chapters warning (#9263)
This commit is contained in:
		@@ -52,17 +52,15 @@ 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,
 | 
			
		||||
            maxLines = 1,
 | 
			
		||||
            overflow = TextOverflow.Ellipsis,
 | 
			
		||||
            style = MaterialTheme.typography.bodySmall,
 | 
			
		||||
            color = MaterialTheme.colorScheme.error,
 | 
			
		||||
        )
 | 
			
		||||
    }
 | 
			
		||||
    Text(
 | 
			
		||||
        modifier = Modifier.secondaryItemAlpha(),
 | 
			
		||||
        text = text,
 | 
			
		||||
        maxLines = 1,
 | 
			
		||||
        overflow = TextOverflow.Ellipsis,
 | 
			
		||||
        style = MaterialTheme.typography.bodySmall,
 | 
			
		||||
        color = MaterialTheme.colorScheme.error,
 | 
			
		||||
    )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user