Skip to content

Commit

Permalink
[feat] : #15 Friend Record ItemClick Remove
Browse files Browse the repository at this point in the history
  • Loading branch information
SsongSik committed Jun 15, 2023
1 parent 70cd622 commit 1597df5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ class FriendFragment : BaseFragment<FragmentFriendBinding>(R.layout.fragment_fri
layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = friendRecordGetAdapter
}

// 클릭 리스너
friendRecordGetAdapter.setOnItemClickListener {
Toast.makeText(requireContext(), "${it.nickname}", Toast.LENGTH_SHORT).show()
}
}

private fun getAllFriendRecord() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ class FriendRecordGetAdapter(
override fun onBindViewHolder(holder: FriendGetRecordViewHolder, position: Int) {
val friends = currentList[position]
holder.bind(friends)
holder.itemView.setOnClickListener {
onItemClickListener?.let{ it(friends) }
}
}

private var onItemClickListener : ((GetFriendRecord) -> Unit)? = null
fun setOnItemClickListener(listener : (GetFriendRecord) -> Unit){
onItemClickListener = listener
}

inner class FriendGetRecordViewHolder(
Expand Down

0 comments on commit 1597df5

Please sign in to comment.