clean up references in ChatFragment
This commit is contained in:
parent
e6bf595388
commit
c858b5346f
|
@ -145,4 +145,18 @@ public class ChatFragment extends Fragment {
|
||||||
FlashBackgroundDrawable.flashBackground(view, messageId);
|
FlashBackgroundDrawable.flashBackground(view, messageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
nullReferences();
|
||||||
|
super.onDestroyView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nullReferences() {
|
||||||
|
this.binding.messages.setAdapter(null);
|
||||||
|
this.recyclerViewScroller = null;
|
||||||
|
this.messageAdapter.setOnNavigateToInReplyTo(null);
|
||||||
|
this.messageAdapter = null;
|
||||||
|
this.binding = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue