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.m1;
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 m1 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(2131558708, this);
int i2 = 2131365687;
TypingDot typingDot = (TypingDot) findViewById(2131365687);
if (typingDot != null) {
i2 = 2131365688;
TypingDot typingDot2 = (TypingDot) findViewById(2131365688);
if (typingDot2 != null) {
i2 = 2131365689;
TypingDot typingDot3 = (TypingDot) findViewById(2131365689);
if (typingDot3 != null) {
m1 m1Var = new m1(this, typingDot, typingDot2, typingDot3);
m.checkNotNullExpressionValue(m1Var, "TypingDotsViewBinding.in…ater.from(context), this)");
this.j = m1Var;
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.f125c.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() {
m1 m1Var = this.j;
for (TypingDot typingDot : n.listOf((Object[]) new TypingDot[]{m1Var.b, m1Var.f125c, m1Var.d})) {
typingDot.i.cancel();
typingDot.j.cancel();
}
this.m = false;
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
b();
}
}