176 lines
6.4 KiB
Java
176 lines
6.4 KiB
Java
package com.scb.phone.view.adapter.bulktransfer;
|
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.CheckBox;
|
|
import android.widget.ImageView;
|
|
import android.widget.TextView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.Unbinder;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.adapter.bulktransfer.SelectRecipientFromFavouriteAdapter;
|
|
import java.util.List;
|
|
import o.C12102erq;
|
|
import o.C12891fKc;
|
|
import o.FU;
|
|
import o.GEP;
|
|
import o.YKU;
|
|
import o.nMh;
|
|
import o.pyT;
|
|
import o.qsu;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class SelectRecipientFromFavouriteAdapter extends RecyclerView.Sts<RecipientViewHolder> {
|
|
public final List<FU> c;
|
|
private LWm d;
|
|
private final int e;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface LWm {
|
|
void b(boolean z);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class RecipientViewHolder_ViewBinding implements Unbinder {
|
|
private RecipientViewHolder c;
|
|
|
|
public RecipientViewHolder_ViewBinding(RecipientViewHolder recipientViewHolder, View view) {
|
|
this.c = recipientViewHolder;
|
|
recipientViewHolder.billerName = (TextView) pyT.e(view, R.id.biller_name_text_view, "field 'billerName'", TextView.class);
|
|
recipientViewHolder.billerAvatar = (ImageView) pyT.e(view, R.id.biller_avatar_image_view, "field 'billerAvatar'", ImageView.class);
|
|
recipientViewHolder.checkBox = (CheckBox) pyT.e(view, R.id.checkbox, "field 'checkBox'", CheckBox.class);
|
|
}
|
|
|
|
@Override // butterknife.Unbinder
|
|
public final void a() {
|
|
RecipientViewHolder recipientViewHolder = this.c;
|
|
if (recipientViewHolder == null) {
|
|
throw new IllegalStateException("Bindings already cleared.");
|
|
}
|
|
this.c = null;
|
|
recipientViewHolder.billerName = null;
|
|
recipientViewHolder.billerAvatar = null;
|
|
recipientViewHolder.checkBox = null;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ void onBindViewHolder(RecipientViewHolder recipientViewHolder, int i) {
|
|
RecipientViewHolder recipientViewHolder2 = recipientViewHolder;
|
|
FU fu = this.c.get(i);
|
|
recipientViewHolder2.b.setOnClickListener(new View.OnClickListener(recipientViewHolder2, fu, i) { // from class: o.eru
|
|
private FU a;
|
|
private int b;
|
|
private SelectRecipientFromFavouriteAdapter.RecipientViewHolder d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
SelectRecipientFromFavouriteAdapter.RecipientViewHolder.d(this.d, this.a, this.b);
|
|
}
|
|
|
|
{
|
|
this.d = recipientViewHolder2;
|
|
this.a = fu;
|
|
this.b = i;
|
|
}
|
|
});
|
|
recipientViewHolder2.billerName.setText(fu.h);
|
|
C12891fKc.azf_(recipientViewHolder2.b.getContext(), R.drawable.bankicon_place_holder, recipientViewHolder2.billerAvatar, fu.c, recipientViewHolder2.b.getContext().getResources().getDimensionPixelOffset(R.dimen.f15212131165285), nMh.getColor(recipientViewHolder2.b.getContext(), R.color.f3412131099849));
|
|
recipientViewHolder2.checkBox.setChecked(fu.i);
|
|
recipientViewHolder2.b.setAlpha(fu.f ? 1.0f : 0.5f);
|
|
}
|
|
|
|
public SelectRecipientFromFavouriteAdapter(List<FU> list, int i, LWm lWm) {
|
|
this.c = list;
|
|
this.d = lWm;
|
|
this.e = i;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final int getItemCount() {
|
|
return this.c.size();
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static class RecipientViewHolder extends RecyclerView.zJl {
|
|
final View b;
|
|
|
|
@BindView
|
|
public ImageView billerAvatar;
|
|
|
|
@BindView
|
|
public TextView billerName;
|
|
|
|
@BindView
|
|
public CheckBox checkBox;
|
|
private RVV e;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public interface RVV {
|
|
void a(int i);
|
|
}
|
|
|
|
RecipientViewHolder(View view, RVV rvv) {
|
|
super(view);
|
|
this.b = view;
|
|
this.e = rvv;
|
|
ButterKnife.c(this, view);
|
|
}
|
|
|
|
public static /* synthetic */ void d(RecipientViewHolder recipientViewHolder, FU fu, int i) {
|
|
fu.i = !fu.i;
|
|
recipientViewHolder.e.a(i);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(SelectRecipientFromFavouriteAdapter selectRecipientFromFavouriteAdapter, int i) {
|
|
YKU yku = new YKU(selectRecipientFromFavouriteAdapter.c);
|
|
long c = new YKU(yku.a, new GEP(yku.b, new C12102erq())).c();
|
|
long j = 10 - selectRecipientFromFavouriteAdapter.e;
|
|
if (j < c) {
|
|
selectRecipientFromFavouriteAdapter.c.get(i).i = false;
|
|
selectRecipientFromFavouriteAdapter.a();
|
|
} else if (j == c) {
|
|
selectRecipientFromFavouriteAdapter.a();
|
|
} else {
|
|
new YKU(selectRecipientFromFavouriteAdapter.c).d(new qsu() { // from class: o.erp
|
|
@Override // o.qsu
|
|
public final void d(Object obj) {
|
|
((FU) obj).f = true;
|
|
}
|
|
});
|
|
selectRecipientFromFavouriteAdapter.notifyDataSetChanged();
|
|
}
|
|
selectRecipientFromFavouriteAdapter.d.b(c > 0);
|
|
}
|
|
|
|
private void a() {
|
|
new YKU(this.c).b(new C12102erq()).d(new qsu() { // from class: o.err
|
|
@Override // o.qsu
|
|
public final void d(Object obj) {
|
|
((FU) obj).f = false;
|
|
}
|
|
});
|
|
notifyDataSetChanged();
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public final /* synthetic */ RecipientViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
return new RecipientViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131560096, viewGroup, false), new RecipientViewHolder.RVV(this) { // from class: o.erv
|
|
private SelectRecipientFromFavouriteAdapter e;
|
|
|
|
@Override // com.scb.phone.view.adapter.bulktransfer.SelectRecipientFromFavouriteAdapter.RecipientViewHolder.RVV
|
|
public final void a(int i2) {
|
|
SelectRecipientFromFavouriteAdapter.a(this.e, i2);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
});
|
|
}
|
|
}
|