Flipped equality check
@@ -52,7 +52,7 @@ public abstract class BaseKeyframeAnimation<K, A> {
public void setProgress(@FloatRange(from = 0f, to = 1f) float progress) {
// Must use hashCode() since the actual object instance will be returned
// from getValue() below with the new values.
- int previousValue = valueCallback == null ? 0 : getValue().hashCode();
+ int previousValue = valueCallback == null ? getValue().hashCode() : 0;
if (progress < getStartDelayProgress()) {
progress = getStartDelayProgress();
} else if (progress > getEndProgress()) {
@@ -64,7 +64,7 @@ public abstract class BaseKeyframeAnimation<K, A> {
}
this.progress = progress;
// Just trigger a change but don't compute values if there is a value callback.
- int newValue = valueCallback == null ? -1 : getValue().hashCode();
+ int newValue = valueCallback == null ? getValue().hashCode() : -1;
if (previousValue != newValue) {
notifyListeners();
