feat: Show the post's language tag in the detailed view (#546)

This commit is contained in:
Nik Clayton 2024-03-19 18:00:33 +01:00 committed by GitHub
parent 4f9b283432
commit bcceaaa434
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import app.pachli.util.description
import app.pachli.util.icon
import app.pachli.viewdata.StatusViewData
import java.text.DateFormat
import java.util.Locale
class StatusDetailedViewHolder(
private val binding: ItemStatusDetailedBinding,
@ -43,6 +44,11 @@ class StatusDetailedViewHolder(
sb.append(" ")
sb.append(dateFormat.format(createdAt))
viewData.status.language?.also {
sb.append(metadataJoiner)
sb.append(it.uppercase(Locale.getDefault()))
}
editedAt?.also {
val editedAtString = context.getString(R.string.post_edited, dateFormat.format(it))
sb.append(metadataJoiner)