From daf042f5ded9d75caaf27437fea2c07b6c6e049a Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Fri, 9 Dec 2022 23:10:25 -0500 Subject: [PATCH] Fix ClassCastException in Compose 1.4.x Resolves #641 in a backward-compatible way --- .../paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paparazzi/paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt b/paparazzi/paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt index 01fc9c72f8..5c91f4dbee 100644 --- a/paparazzi/paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt +++ b/paparazzi/paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt @@ -572,7 +572,7 @@ class Paparazzi @JvmOverloads constructor( val snapshotInvalidations = recomposer.javaClass .getDeclaredField("snapshotInvalidations") .apply { isAccessible = true } - .get(recomposer) as MutableList<*> + .get(recomposer) as MutableCollection<*> compositionInvalidations.clear() snapshotInvalidations.clear() applyObservers.clear()