enhancement: shows only one date for edited contents (#456)

This commit is contained in:
Diego Beraldin 2024-01-17 09:16:51 +01:00 committed by GitHub
parent 086ec44c2f
commit 2b03b93f8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,12 @@ fun PostCardFooter(
)
}
}
if (publishDate != null) {
listOf(
updateDate.orEmpty(),
publishDate.orEmpty(),
).firstOrNull {
it.isNotBlank()
}?.also { publishDate ->
Row(
verticalAlignment = Alignment.CenterVertically,
) {
@ -124,22 +129,13 @@ fun PostCardFooter(
)
}
}
if (updateDate != null) {
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
modifier = buttonModifier,
imageVector = Icons.Default.Edit,
contentDescription = null,
tint = ancillaryColor,
)
Text(
text = updateDate.prettifyDate(),
style = MaterialTheme.typography.labelLarge,
color = ancillaryColor,
)
}
if (updateDate.orEmpty().isNotBlank()) {
Icon(
modifier = buttonModifier,
imageVector = Icons.Default.Edit,
contentDescription = null,
tint = ancillaryColor,
)
}
if (options.isNotEmpty()) {
Icon(