Remove listeners when detaching conversation item views.

This commit is contained in:
Cody Henthorne 2020-06-05 18:29:55 -04:00 committed by GitHub
parent d38d702adf
commit 7dd3efeb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -285,6 +285,7 @@ public class ConversationItem extends LinearLayout implements BindableConversati
@Override
protected void onDetachedFromWindow() {
ConversationSwipeAnimationHelper.update(this, 0f, 1f);
unbind();
super.onDetachedFromWindow();
}

View File

@ -87,6 +87,12 @@ public class ConversationUpdateItem extends LinearLayout
bind(messageRecord, locale);
}
@Override
protected void onDetachedFromWindow() {
unbind();
super.onDetachedFromWindow();
}
@Override
public void setEventListener(@Nullable EventListener listener) {
// No events to report yet