mirror of
https://github.com/accelforce/Yuito
synced 2024-12-23 05:55:20 +01:00
Use the adapter position when responding to clicks on followed tags (#3334)
This ensures that the position is valid w.r.t. to the backing array. Fixes https://github.com/tuskyapp/Tusky/issues/3333
This commit is contained in:
parent
8f3869d42e
commit
2974265c4a
@ -22,7 +22,7 @@ class FollowedTagsAdapter(
|
|||||||
viewModel.tags[position].let { tag ->
|
viewModel.tags[position].let { tag ->
|
||||||
holder.itemView.findViewById<TextView>(R.id.followed_tag).text = tag.name
|
holder.itemView.findViewById<TextView>(R.id.followed_tag).text = tag.name
|
||||||
holder.itemView.findViewById<ImageButton>(R.id.followed_tag_unfollow).setOnClickListener {
|
holder.itemView.findViewById<ImageButton>(R.id.followed_tag_unfollow).setOnClickListener {
|
||||||
actionListener.unfollow(tag.name, position)
|
actionListener.unfollow(tag.name, holder.bindingAdapterPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user