Fix image scaling when the display scale changes
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieComposition.java b/lottie/src/main/java/com/airbnb/lottie/LottieComposition.java
index 7144543..a03e392 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieComposition.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieComposition.java
@@ -219,13 +219,13 @@
public Map<String, LottieImageAsset> getImages() {
float dpScale = Utils.dpScale();
if (dpScale != imagesDpScale) {
- imagesDpScale = dpScale;
Set<Map.Entry<String, LottieImageAsset>> entries = images.entrySet();
for (Map.Entry<String, LottieImageAsset> entry : entries) {
images.put(entry.getKey(), entry.getValue().copyWithScale(imagesDpScale / dpScale));
}
}
+ imagesDpScale = dpScale;
return images;
}