fix bug where unmuting would unmute wrong account
This commit is contained in:
parent
4f50bb5566
commit
aa64a879f1
|
@ -46,7 +46,7 @@ public class MutesAdapter extends AccountAdapter {
|
||||||
if (position < accountList.size()) {
|
if (position < accountList.size()) {
|
||||||
MutedUserViewHolder holder = (MutedUserViewHolder) viewHolder;
|
MutedUserViewHolder holder = (MutedUserViewHolder) viewHolder;
|
||||||
holder.setupWithAccount(accountList.get(position));
|
holder.setupWithAccount(accountList.get(position));
|
||||||
holder.setupActionListener(accountActionListener, position);
|
holder.setupActionListener(accountActionListener);
|
||||||
} else {
|
} else {
|
||||||
FooterViewHolder holder = (FooterViewHolder) viewHolder;
|
FooterViewHolder holder = (FooterViewHolder) viewHolder;
|
||||||
holder.setState(footerState);
|
holder.setState(footerState);
|
||||||
|
@ -90,8 +90,8 @@ public class MutesAdapter extends AccountAdapter {
|
||||||
.into(avatar);
|
.into(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupActionListener(final AccountActionListener listener, final int position) {
|
void setupActionListener(final AccountActionListener listener) {
|
||||||
unmute.setOnClickListener(v -> listener.onMute(false, id, position));
|
unmute.setOnClickListener(v -> listener.onMute(false, id, getAdapterPosition()));
|
||||||
avatar.setOnClickListener(v -> listener.onViewAccount(id));
|
avatar.setOnClickListener(v -> listener.onViewAccount(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue