From 357a859cdcea7ae44f7682792595e5f2db6d0849 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 30 Aug 2022 16:28:02 +0300 Subject: [PATCH] Cleanup recyclerview. --- .../features/settings/devices/v2/list/OtherSessionsView.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsView.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsView.kt index bcb9726b5c..55978e61fd 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsView.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsView.kt @@ -21,6 +21,7 @@ import android.util.AttributeSet import androidx.constraintlayout.widget.ConstraintLayout import dagger.hilt.android.AndroidEntryPoint import im.vector.app.R +import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.configureWith import im.vector.app.databinding.ViewOtherSessionsBinding import im.vector.app.features.settings.devices.DeviceFullInfo @@ -47,4 +48,9 @@ class OtherSessionsView @JvmOverloads constructor( views.otherSessionsViewAllButton.text = context.getString(R.string.device_manager_other_sessions_view_all, devices.size) otherSessionsController.setData(devices) } + + override fun onDetachedFromWindow() { + views.otherSessionsRecyclerView.cleanup() + super.onDetachedFromWindow() + } }