Fix memory leak in conversation fragment.

This commit is contained in:
Cody Henthorne 2023-02-13 13:07:32 -05:00 committed by GitHub
parent 805ccc4f7a
commit 7a72a9a0d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,6 +456,12 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
});
}
@Override
public void onDestroy() {
ApplicationDependencies.getDatabaseObserver().unregisterObserver(threadDeletedObserver);
super.onDestroy();
}
private @NonNull GiphyMp4ProjectionRecycler initializeGiphyMp4() {
int maxPlayback = GiphyMp4PlaybackPolicy.maxSimultaneousPlaybackInConversation();
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(),