Skip to content

Commit cec83dc

Browse files
authored
Merge pull request #431 from SaeedNoshadi89/show-all-news-authors
Show all authors in the news card
2 parents 26a9dfe + adeb06c commit cec83dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ fun NewsResourceAuthors(
156156
authors: List<Author>
157157
) {
158158
if (authors.isNotEmpty()) {
159-
// Only display first author for now
160-
val author = authors[0]
159+
// display all authors
160+
val authorNameFormatted =
161+
authors.joinToString(separator = ", ") { author -> author.name }
162+
.uppercase(Locale.getDefault())
161163

162-
val authorNameFormatted = author.name.uppercase(Locale.getDefault())
163-
164-
val authorImageUrl = author.imageUrl
164+
val authorImageUrl = authors[0].imageUrl
165165

166166
val authorImageModifier = Modifier
167167
.clip(CircleShape)

0 commit comments

Comments
 (0)