Fix unable to select contact from list bug.

This commit is contained in:
Cody Henthorne
2021-12-09 13:28:50 -05:00
parent 761d70851c
commit 3b9cfc8e5a
3 changed files with 12 additions and 5 deletions

View File

@@ -71,6 +71,14 @@ public class ContactSelectionListItem extends ConstraintLayout implements Recipi
ViewUtil.setTextViewGravityStart(this.nameView, getContext());
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (recipient != null) {
recipient.observeForever(this);
}
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
@@ -150,7 +158,6 @@ public class ContactSelectionListItem extends ConstraintLayout implements Recipi
public void unbind() {
if (recipient != null) {
recipient.removeForeverObserver(this);
recipient = null;
}
}