discord-jadx/app/src/main/java/com/discord/views/typing/TypingDots.java

74 lines
2.6 KiB
Java

package com.discord.views.typing;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import androidx.constraintlayout.widget.ConstraintLayout;
import c.a.i.k1;
import c.a.y.p0.a;
import d0.t.n;
import d0.z.d.m;
/* compiled from: TypingDots.kt */
public final class TypingDots extends ConstraintLayout {
public static final /* synthetic */ int i = 0;
public final k1 j;
public final int k;
public final long l;
public boolean m;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public TypingDots(Context context, AttributeSet attributeSet) {
super(context, attributeSet, 0);
m.checkNotNullParameter(context, "context");
LayoutInflater.from(context).inflate(2131558705, this);
int i2 = 2131365663;
TypingDot typingDot = (TypingDot) findViewById(2131365663);
if (typingDot != null) {
i2 = 2131365664;
TypingDot typingDot2 = (TypingDot) findViewById(2131365664);
if (typingDot2 != null) {
i2 = 2131365665;
TypingDot typingDot3 = (TypingDot) findViewById(2131365665);
if (typingDot3 != null) {
k1 k1Var = new k1(this, typingDot, typingDot2, typingDot3);
m.checkNotNullExpressionValue(k1Var, "TypingDotsViewBinding.in…ater.from(context), this)");
this.j = k1Var;
int integer = getResources().getInteger(2131427332);
this.k = integer;
this.l = (long) (((double) integer) / 1.5d);
typingDot3.setOnScaleDownCompleteListener(new a(this));
return;
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i2)));
}
public final void a(boolean z2) {
if (!(this.m && !z2)) {
long j = z2 ? this.l : 0;
this.j.b.a(j);
this.j.f113c.a(this.l + j);
TypingDot typingDot = this.j.d;
long j2 = this.l;
typingDot.a(j + j2 + j2);
this.m = true;
}
}
public final void b() {
k1 k1Var = this.j;
for (TypingDot typingDot : n.listOf((Object[]) new TypingDot[]{k1Var.b, k1Var.f113c, k1Var.d})) {
typingDot.i.cancel();
typingDot.j.cancel();
}
this.m = false;
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
b();
}
}