fix: addon description as optional instead of required

This commit is contained in:
tapframe 2026-04-10 20:23:19 +05:30
parent f9af2201e9
commit baf8ea2ec0
2 changed files with 10 additions and 7 deletions

View file

@ -25,7 +25,7 @@ internal object AddonManifestParser {
return AddonManifest(
id = root.requiredString("id"),
name = root.requiredString("name"),
description = root.requiredString("description"),
description = root.optionalString("description").orEmpty(),
version = root.requiredString("version"),
logoUrl = root.optionalString("logo")?.resolveAgainstManifest(manifestUrl),
resources = root.resources(defaultTypes, defaultPrefixes),

View file

@ -408,13 +408,16 @@ private fun InstalledAddonCard(
manifest != null -> {
Spacer(modifier = Modifier.height(16.dp))
Text(
text = manifest.description,
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
manifest.description.takeIf { it.isNotBlank() }?.let { description ->
Text(
text = description,
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Spacer(modifier = Modifier.height(14.dp))
}
Spacer(modifier = Modifier.height(14.dp))
Text(
text = manifestSummary(manifest),
style = MaterialTheme.typography.bodyMedium,