From 09052b0a1f17b70c15d1afac51c247b4fce7b0c5 Mon Sep 17 00:00:00 2001 From: QArtur99 Date: Fri, 15 May 2020 10:52:16 +0200 Subject: [PATCH] Fix HomeActivityTest --- core/src/main/java/io/plaidapp/core/data/DataManager.kt | 2 +- .../plaidapp/core/ui/recyclerview/SlideInItemAnimator.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/io/plaidapp/core/data/DataManager.kt b/core/src/main/java/io/plaidapp/core/data/DataManager.kt index d45278a01..ba45ac477 100644 --- a/core/src/main/java/io/plaidapp/core/data/DataManager.kt +++ b/core/src/main/java/io/plaidapp/core/data/DataManager.kt @@ -100,7 +100,7 @@ class DataManager @Inject constructor( } fun cancelLoading() { - parentJobs.values.forEach { it.cancel() } + parentJobs.values.toList().forEach { it.cancel() } parentJobs.clear() } diff --git a/core/src/main/java/io/plaidapp/core/ui/recyclerview/SlideInItemAnimator.kt b/core/src/main/java/io/plaidapp/core/ui/recyclerview/SlideInItemAnimator.kt index 0111717be..f26c8622d 100644 --- a/core/src/main/java/io/plaidapp/core/ui/recyclerview/SlideInItemAnimator.kt +++ b/core/src/main/java/io/plaidapp/core/ui/recyclerview/SlideInItemAnimator.kt @@ -108,10 +108,10 @@ open class SlideInItemAnimator @JvmOverloads constructor( } override fun endAnimations() { - pendingAdds.forEach(::endPendingAdd) - runningAdds.forEach(::endRunningAdd) - pendingMoves.forEach(::endPendingMove) - runningMoves.forEach(::endRunningMove) + pendingAdds.toList().forEach(::endPendingAdd) + runningAdds.toList().forEach(::endRunningAdd) + pendingMoves.toList().forEach(::endPendingMove) + runningMoves.toList().forEach(::endRunningMove) super.endAnimations() }