@onekeyfe/react-native-skeleton 3.0.101 → 3.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,7 +103,11 @@ public class OneKeySkeletonRenderer(
|
|
|
103
103
|
?: ONEKEY_SKELETON_DEFAULT_COLORS.copyOf()
|
|
104
104
|
val colorsChanged = !this.colors.contentEquals(nextColors)
|
|
105
105
|
this.colors = nextColors
|
|
106
|
-
|
|
106
|
+
val normalizedDuration = (durationSeconds ?: 3.0)
|
|
107
|
+
.takeIf { it.isFinite() }
|
|
108
|
+
?.coerceAtLeast(0.1)
|
|
109
|
+
?: 3.0
|
|
110
|
+
durationNanos = (normalizedDuration * 1_000_000_000L).toLong()
|
|
107
111
|
if (colorsChanged) invalidateShader()
|
|
108
112
|
}
|
|
109
113
|
|