Cleanup recyclerview.

This commit is contained in:
Onuray Sahin 2022-08-30 16:28:02 +03:00
parent ec85199250
commit 357a859cdc

View file

@ -21,6 +21,7 @@ import android.util.AttributeSet
import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.ConstraintLayout
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.cleanup
import im.vector.app.core.extensions.configureWith import im.vector.app.core.extensions.configureWith
import im.vector.app.databinding.ViewOtherSessionsBinding import im.vector.app.databinding.ViewOtherSessionsBinding
import im.vector.app.features.settings.devices.DeviceFullInfo 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) views.otherSessionsViewAllButton.text = context.getString(R.string.device_manager_other_sessions_view_all, devices.size)
otherSessionsController.setData(devices) otherSessionsController.setData(devices)
} }
override fun onDetachedFromWindow() {
views.otherSessionsRecyclerView.cleanup()
super.onDetachedFromWindow()
}
} }