what-the-bank/sources/o/C12345ewU.java

191 lines
7.6 KiB
Java

package o;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
import org.bouncycastle.crypto.tls.CipherSuite;
/* renamed from: o.ewU, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12345ewU extends RecyclerView.Sts<RecyclerView.zJl> {
public ArrayList<RJ> a;
private final InterfaceC9454djz b;
public final RJ c;
public int e;
public C12345ewU(ArrayList<RJ> arrayList, InterfaceC9454djz interfaceC9454djz) {
C14957gcv.e(arrayList, "");
C14957gcv.e(interfaceC9454djz, "");
this.a = arrayList;
this.b = interfaceC9454djz;
this.c = new RJ("", YQ.UNKNOWN, "LOADING", "", "", "", "");
}
/* renamed from: o.ewU$HBt */
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
if (i == 1) {
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131559307, viewGroup, false);
if (inflate == null) {
throw new NullPointerException("rootView");
}
LinearLayout linearLayout = (LinearLayout) inflate;
C17201uku c17201uku = new C17201uku(linearLayout, linearLayout);
C14957gcv.c(c17201uku, "");
return new LWm(c17201uku);
}
View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131559274, viewGroup, false);
int i2 = com.scb.phone.R.id.body_textview;
TextView textView = (TextView) qeC.e(inflate2, com.scb.phone.R.id.body_textview);
if (textView != null) {
i2 = com.scb.phone.R.id.btn_continue;
Button button = (Button) qeC.e(inflate2, com.scb.phone.R.id.btn_continue);
if (button != null) {
i2 = com.scb.phone.R.id.image_icon;
ImageView imageView = (ImageView) qeC.e(inflate2, com.scb.phone.R.id.image_icon);
if (imageView != null) {
i2 = com.scb.phone.R.id.subject_textview;
TextView textView2 = (TextView) qeC.e(inflate2, com.scb.phone.R.id.subject_textview);
if (textView2 != null) {
i2 = com.scb.phone.R.id.tv_status;
TextView textView3 = (TextView) qeC.e(inflate2, com.scb.phone.R.id.tv_status);
if (textView3 != null) {
i2 = com.scb.phone.R.id.tv_time_stamp;
TextView textView4 = (TextView) qeC.e(inflate2, com.scb.phone.R.id.tv_time_stamp);
if (textView4 != null) {
C0222BrK c0222BrK = new C0222BrK((LinearLayout) inflate2, textView, button, imageView, textView2, textView3, textView4);
C14957gcv.c(c0222BrK, "");
return new C12343ewS(c0222BrK);
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate2.getResources().getResourceName(i2)));
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
int color;
C14957gcv.e(zjl, "");
if (zjl instanceof C12343ewS) {
C12343ewS c12343ewS = (C12343ewS) zjl;
RJ rj = this.a.get(i);
C14957gcv.c(rj, "");
final RJ rj2 = rj;
final InterfaceC9454djz interfaceC9454djz = this.b;
C14957gcv.e(rj2, "");
C14957gcv.e(interfaceC9454djz, "");
C0222BrK c0222BrK = c12343ewS.d;
Context context = c12343ewS.itemView.getContext();
C12891fKc.azg_(context, nMh.getDrawable(context, com.scb.phone.R.drawable.default_logo), c12343ewS.d.d, rj2.a, context.getResources().getDimensionPixelOffset(com.scb.phone.R.dimen.f15222131165286), nMh.getColor(context, com.scb.phone.R.color.f3412131099849));
c0222BrK.f.setText(rj2.i);
YQ yq = rj2.d;
String str = rj2.b;
if (C12343ewS.b(yq)) {
TextView textView = c12343ewS.d.i;
if (yq == YQ.COMPLETED) {
color = nMh.getColor(c12343ewS.itemView.getContext(), com.scb.phone.R.color.f13722131100880);
} else {
color = nMh.getColor(c12343ewS.itemView.getContext(), com.scb.phone.R.color.f13582131100866);
}
textView.setTextColor(color);
}
c12343ewS.d.i.setText(str);
c0222BrK.e.setText(rj2.f);
c0222BrK.a.setText(rj2.e);
Button button = c0222BrK.c;
String str2 = rj2.c;
if (!(str2 == null || gdZ.d((CharSequence) str2))) {
C14957gcv.c(button, "");
Button button2 = button;
C14957gcv.e(button2, "");
button2.setVisibility(0);
button.setOnClickListener(new View.OnClickListener(interfaceC9454djz, rj2) { // from class: o.ewR
private RJ a;
private InterfaceC9454djz b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
C12343ewS.d(this.b, this.a);
}
{
this.b = interfaceC9454djz;
this.a = rj2;
}
});
return;
}
C14957gcv.c(button, "");
Button button3 = button;
C14957gcv.e(button3, "");
button3.setVisibility(8);
return;
}
if (zjl instanceof LWm) {
LWm lWm = (LWm) zjl;
lWm.b.getLayoutParams().height = CipherSuite.TLS_RSA_WITH_SEED_CBC_SHA;
LinearLayout linearLayout = lWm.b;
C14957gcv.e(linearLayout, "");
linearLayout.setVisibility(0);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.a.size();
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
return C14957gcv.b((Object) this.a.get(i).f, (Object) "LOADING") ? 1 : 0;
}
public final void c(List<RJ> list) {
C14957gcv.e(list, "");
int size = this.a.size();
this.a.addAll(list);
notifyItemRangeInserted(size + 1, this.a.size());
}
/* renamed from: o.ewU$LWm */
/* loaded from: classes5.dex */
public static final class LWm extends RecyclerView.zJl {
LinearLayout b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LWm(C17201uku c17201uku) {
super(c17201uku.b);
C14957gcv.e(c17201uku, "");
LinearLayout linearLayout = c17201uku.d;
C14957gcv.c(linearLayout, "");
this.b = linearLayout;
}
}
static {
new HBt((byte) 0);
}
}