feat: show "Authored by" on posts when applicable

This commit is contained in:
Harsh Shandilya 2024-06-26 21:20:52 +05:30
parent 4ebb99bf7d
commit b132410282
6 changed files with 18 additions and 1 deletions

View file

@ -133,7 +133,10 @@ fun PostDetails(
TagRow(tags = post.tags.toImmutableList())
Spacer(Modifier.height(4.dp))
Submitter(
text = AnnotatedString("Submitted by ${post.submitter}"),
text =
AnnotatedString(
"${if (post.userIsAuthor) "Authored" else "Submitted"} by ${post.submitter}"
),
avatarUrl = "https://lobste.rs/avatars/${post.submitter}-100.png",
contentDescription = "User avatar for ${post.submitter}",
)