apkfuckery/com.discord/smali/com/discord/utilities/animations/LoopAnimationListener.smali
2020-01-02 22:43:52 +01:00

89 lines
2.6 KiB
Smali

.class public final Lcom/discord/utilities/animations/LoopAnimationListener;
.super Ljava/lang/Object;
.source "LottieAnimationUtils.kt"
# interfaces
.implements Landroid/animation/ValueAnimator$AnimatorUpdateListener;
# instance fields
.field public final animationView:Lcom/airbnb/lottie/LottieAnimationView;
.field public final loopFrames:Lkotlin/ranges/IntRange;
.field public final triggerFrame:I
# direct methods
.method public constructor <init>(Lcom/airbnb/lottie/LottieAnimationView;ILkotlin/ranges/IntRange;)V
.locals 1
const/4 v0, 0x0
if-eqz p1, :cond_1
if-eqz p3, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->animationView:Lcom/airbnb/lottie/LottieAnimationView;
iput p2, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->triggerFrame:I
iput-object p3, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->loopFrames:Lkotlin/ranges/IntRange;
return-void
:cond_0
const-string p1, "loopFrames"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "animationView"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public onAnimationUpdate(Landroid/animation/ValueAnimator;)V
.locals 2
iget-object p1, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->animationView:Lcom/airbnb/lottie/LottieAnimationView;
invoke-virtual {p1}, Lcom/airbnb/lottie/LottieAnimationView;->getFrame()I
move-result p1
iget v0, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->triggerFrame:I
if-lt p1, v0, :cond_0
iget-object p1, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->animationView:Lcom/airbnb/lottie/LottieAnimationView;
iget-object v0, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->loopFrames:Lkotlin/ranges/IntRange;
invoke-virtual {v0}, Lkotlin/ranges/IntProgression;->getFirst()I
move-result v0
iget-object v1, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->loopFrames:Lkotlin/ranges/IntRange;
invoke-virtual {v1}, Lkotlin/ranges/IntProgression;->getLast()I
move-result v1
invoke-virtual {p1, v0, v1}, Lcom/airbnb/lottie/LottieAnimationView;->a(II)V
iget-object p1, p0, Lcom/discord/utilities/animations/LoopAnimationListener;->animationView:Lcom/airbnb/lottie/LottieAnimationView;
invoke-virtual {p1, p0}, Lcom/airbnb/lottie/LottieAnimationView;->b(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
:cond_0
return-void
.end method