Store scopeToCancel.
Without this the scope that gets cancelled can be the new one after re-attaching. This results in no flows working - hence blank thumbnails. Fix: 369590189 Flag: com.android.launcher3.enable_refactor_task_thumbnail Test: Manual - visually verified Change-Id: Ie930d890095c30c4be8e87c795a06383ac06ea9e
This commit is contained in:
@@ -127,8 +127,9 @@ class TaskThumbnailView : FrameLayout, ViewPool.Reusable {
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
val scopeToCancel = viewAttachedScope
|
||||
recentsCoroutineScope.launch(dispatcherProvider.background) {
|
||||
viewAttachedScope.cancel("TaskThumbnailView detaching from window")
|
||||
scopeToCancel.cancel("TaskThumbnailView detaching from window")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user