29 lines
1.2 KiB
Java
29 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);
|
|
}
|
|
}
|
|
}
|