Fix share contact list updating improperly on selection change.

This commit is contained in:
Cody Henthorne 2021-06-28 16:40:14 -04:00 committed by Greyson Parrelli
parent 911dd9efb1
commit aba5774446

View file

@ -189,7 +189,11 @@ public class ContactSelectionListItem extends LinearLayout implements RecipientF
@Override
public void onRecipientChanged(@NonNull Recipient recipient) {
contactPhotoImage.setAvatar(glideRequests, recipient, false);
setText(recipient, contactType, contactName, contactNumber, contactLabel, contactAbout);
if (this.recipient != null && this.recipient.getId().equals(recipient.getId())) {
contactPhotoImage.setAvatar(glideRequests, recipient, false);
setText(recipient, contactType, contactName, contactNumber, contactLabel, contactAbout);
} else {
Log.w(TAG, "Bad change! Local recipient doesn't match. Ignoring. Local: " + (this.recipient == null ? "null" : this.recipient.getId()) + ", Changed: " + recipient.getId());
}
}
}