diff --git a/app/src/main/java/im/conversations/android/ui/fragment/main/ChatFragment.java b/app/src/main/java/im/conversations/android/ui/fragment/main/ChatFragment.java index 2fa6f054b..dcf858c3e 100644 --- a/app/src/main/java/im/conversations/android/ui/fragment/main/ChatFragment.java +++ b/app/src/main/java/im/conversations/android/ui/fragment/main/ChatFragment.java @@ -145,4 +145,18 @@ public class ChatFragment extends Fragment { 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; + } }