discord-jadx/app/src/main/java/com/discord/utilities/animations/LoopAnimationListener.java

30 lines
1.2 KiB
Java

package com.discord.utilities.animations;
import android.animation.ValueAnimator;
import com.airbnb.lottie.LottieAnimationView;
import d0.z.d.m;
import kotlin.ranges.IntRange;
/* compiled from: LottieAnimationUtils.kt */
public final class LoopAnimationListener implements ValueAnimator.AnimatorUpdateListener {
private final LottieAnimationView animationView;
private final IntRange loopFrames;
private final int triggerFrame;
public LoopAnimationListener(LottieAnimationView lottieAnimationView, int i, IntRange intRange) {
m.checkNotNullParameter(lottieAnimationView, "animationView");
m.checkNotNullParameter(intRange, "loopFrames");
this.animationView = lottieAnimationView;
this.triggerFrame = i;
this.loopFrames = intRange;
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public void onAnimationUpdate(ValueAnimator valueAnimator) {
if (this.animationView.getFrame() >= this.triggerFrame) {
LottieAnimationView lottieAnimationView = this.animationView;
lottieAnimationView.o.p(this.loopFrames.getFirst(), this.loopFrames.getLast());
this.animationView.o.k.i.remove(this);
}
}
}