Skip to content

Commit

Permalink
[feat] : #15 친구 목록 이름 길이 분기처리
Browse files Browse the repository at this point in the history
  • Loading branch information
SsongSik committed May 17, 2023
1 parent dffc829 commit 3e13f3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.teampome.pome.model.response
//내 친구 목록 조회 Response
data class GetFriends(
val friendUserId: String,
val friendNickName: String,
var friendNickName: String,
val imageKey: String,
val friend: Boolean
)
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ class FriendGetAdapter : ListAdapter<GetFriends, FriendGetAdapter.FriendGetViewH
) : RecyclerView.ViewHolder(binding.root){

fun bind(getFriends: GetFriends){
binding.getFriends = getFriends
binding.friendAllTv.text = if (getFriends.friendNickName.length >= 3) {
"${getFriends.friendNickName.substring(0, 3)}..."
} else {
getFriends.friendNickName
}
}

}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/item_friends_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
android:id="@+id/friend_all_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{getFriends.friendNickName}"
tools:text="@string/friend_profile_name"
android:textColor="@color/grey_5"
app:layout_constraintTop_toBottomOf="@+id/friend_list_profile_iv"
Expand Down

0 comments on commit 3e13f3f

Please sign in to comment.