From 2c2349aa639619d67477b7b649a8b77336d1ae4e Mon Sep 17 00:00:00 2001 From: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Mon, 23 Jan 2023 15:35:33 +0100 Subject: [PATCH] Remove callback when RoomProfileFragment is destroyed --- .../im/vector/app/features/roomprofile/RoomProfileFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt index 51885dbf39..91f57d33e9 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt @@ -207,6 +207,7 @@ class RoomProfileFragment : } override fun onDestroyView() { + roomProfileController.callback = null views.matrixProfileAppBarLayout.removeOnOffsetChangedListener(appBarStateChangeListener) views.matrixProfileRecyclerView.cleanup() appBarStateChangeListener = null