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
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ class FollowedTagsAdapter(
|
|||
viewModel.tags[position].let { tag ->
|
||||
holder.itemView.findViewById<TextView>(R.id.followed_tag).text = tag.name
|
||||
holder.itemView.findViewById<ImageButton>(R.id.followed_tag_unfollow).setOnClickListener {
|
||||
actionListener.unfollow(tag.name, position)
|
||||
actionListener.unfollow(tag.name, holder.bindingAdapterPosition)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue