mirror of
https://github.com/oxen-io/session-android.git
synced 2025-03-11 07:40:53 +00:00
Fix problem where recycled group avatar icons have stale listener
Fixes #7089 // FREEBIE
This commit is contained in:
parent
671023d0c8
commit
4bd3094bad
@ -58,9 +58,7 @@ public class AvatarImageView extends ImageView {
|
|||||||
|
|
||||||
private void setAvatarClickHandler(final Recipient recipient, boolean quickContactEnabled) {
|
private void setAvatarClickHandler(final Recipient recipient, boolean quickContactEnabled) {
|
||||||
if (!recipient.isGroupRecipient() && quickContactEnabled) {
|
if (!recipient.isGroupRecipient() && quickContactEnabled) {
|
||||||
setOnClickListener(new View.OnClickListener() {
|
super.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (recipient.getContactUri() != null) {
|
if (recipient.getContactUri() != null) {
|
||||||
ContactsContract.QuickContact.showQuickContact(getContext(), AvatarImageView.this, recipient.getContactUri(), ContactsContract.QuickContact.MODE_LARGE, null);
|
ContactsContract.QuickContact.showQuickContact(getContext(), AvatarImageView.this, recipient.getContactUri(), ContactsContract.QuickContact.MODE_LARGE, null);
|
||||||
} else {
|
} else {
|
||||||
@ -73,7 +71,6 @@ public class AvatarImageView extends ImageView {
|
|||||||
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
||||||
getContext().startActivity(intent);
|
getContext().startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
super.setOnClickListener(listener);
|
super.setOnClickListener(listener);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user