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

74 lines
2.6 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.views.typing;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import androidx.constraintlayout.widget.ConstraintLayout;
2021-07-03 23:36:06 +00:00
import c.a.i.l1;
2021-06-27 20:44:35 +00:00
import c.a.z.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;
2021-07-03 23:36:06 +00:00
public final l1 j;
2021-06-27 20:44:35 +00:00
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(2131558698, this);
2021-07-04 15:26:29 +00:00
int i2 = 2131365574;
TypingDot typingDot = (TypingDot) findViewById(2131365574);
2021-06-27 20:44:35 +00:00
if (typingDot != null) {
2021-07-04 15:26:29 +00:00
i2 = 2131365575;
TypingDot typingDot2 = (TypingDot) findViewById(2131365575);
2021-06-27 20:44:35 +00:00
if (typingDot2 != null) {
2021-07-04 15:26:29 +00:00
i2 = 2131365576;
TypingDot typingDot3 = (TypingDot) findViewById(2131365576);
2021-06-27 20:44:35 +00:00
if (typingDot3 != null) {
2021-07-03 23:36:06 +00:00
l1 l1Var = new l1(this, typingDot, typingDot2, typingDot3);
m.checkNotNullExpressionValue(l1Var, "TypingDotsViewBinding.in…ater.from(context), this)");
this.j = l1Var;
2021-06-27 20:44:35 +00:00
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);
2021-07-03 23:36:06 +00:00
this.j.f119c.a(this.l + j);
2021-06-27 20:44:35 +00:00
TypingDot typingDot = this.j.d;
long j2 = this.l;
typingDot.a(j + j2 + j2);
this.m = true;
}
}
public final void b() {
2021-07-03 23:36:06 +00:00
l1 l1Var = this.j;
for (TypingDot typingDot : n.listOf((Object[]) new TypingDot[]{l1Var.b, l1Var.f119c, l1Var.d})) {
2021-06-27 20:44:35 +00:00
typingDot.i.cancel();
typingDot.j.cancel();
}
this.m = false;
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
b();
}
}