A cheap attempt at a native Bluesky client for Android

SkeetView: Only show embed details if present

Do not show the `HorizontalDivider`, title, or description for an embedded link if their corresponding fields are empty.

+23 -18
+23 -18
app/src/main/java/industries/geesawra/monarch/SkeetView.kt
··· 310 310 .height(180.dp) 311 311 .fillMaxWidth() 312 312 ) 313 - 313 + } 314 + if (ev.title.isNotEmpty()) { 314 315 HorizontalDivider( 315 316 color = MaterialTheme.colorScheme.outlineVariant, 316 317 ) 318 + 319 + Text( 320 + text = ev.title, 321 + style = MaterialTheme.typography.titleSmall, 322 + fontWeight = FontWeight.Bold, 323 + modifier = Modifier 324 + .fillMaxSize() 325 + .padding(top = 8.dp, bottom = 4.dp, start = 8.dp, end = 8.dp), 326 + maxLines = 3 327 + ) 317 328 } 318 - Text( 319 - text = ev.title, 320 - style = MaterialTheme.typography.titleSmall, 321 - fontWeight = FontWeight.Bold, 322 - modifier = Modifier 323 - .fillMaxSize() 324 - .padding(top = 8.dp, bottom = 4.dp, start = 8.dp, end = 8.dp), 325 - maxLines = 3 326 - ) 327 - Text( 328 - text = ev.description, 329 - style = MaterialTheme.typography.bodyMedium, 330 - modifier = Modifier 331 - .fillMaxSize() 332 - .padding(bottom = 8.dp, start = 8.dp, end = 8.dp), 333 - maxLines = 8 334 - ) 329 + 330 + if (ev.description.isNotEmpty()) { 331 + Text( 332 + text = ev.description, 333 + style = MaterialTheme.typography.bodyMedium, 334 + modifier = Modifier 335 + .fillMaxSize() 336 + .padding(bottom = 8.dp, start = 8.dp, end = 8.dp), 337 + maxLines = 8 338 + ) 339 + } 335 340 } 336 341 337 342 }