Skip to content

Commit

Permalink
[Feat] map 함수 추가 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed May 23, 2024
1 parent d5b2ee8 commit 680a8b1
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ class HomeViewModel : ViewModel() {
}

fun mapFollowersToFriendList(followers: List<UserData>) {
for (follower in followers) {
friendList.add(
ItemData.Friend(
profileImage = follower.avatar,
name = "${follower.firstName} ${follower.lastName}",
description = follower.email
)
friendList.addAll(followers.map { follower ->
ItemData.Friend(
profileImage = follower.avatar,
name = "${follower.firstName} ${follower.lastName}",
description = follower.email
)
}
})
}
}

0 comments on commit 680a8b1

Please sign in to comment.