Close #18934: Remove adapter when deataching from window

This commit is contained in:
Jonathan Almeida 2021-04-11 02:58:22 -04:00 committed by Jonathan Almeida
parent 1944a5ef6b
commit cb60461bdd

View File

@ -88,6 +88,9 @@ abstract class BaseBrowserTrayList @JvmOverloads constructor(
tabsFeature.stop()
swipeToDelete.stop()
// Release the adapter so that `onDetachedFromRecyclerView` will be called in the adapter.
adapter = null
touchHelper.attachToRecyclerView(null)
}
}