116 lines
3.0 KiB
Java
116 lines
3.0 KiB
Java
package o;
|
|
|
|
import android.view.View;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.scb.phone.view.adapter.BaseExpandableRecycleViewAdapter;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* renamed from: o.exa, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public abstract class AbstractC12404exa<T> extends BaseExpandableRecycleViewAdapter {
|
|
public List<T> a;
|
|
public C16148leh c;
|
|
private boolean d;
|
|
public View.OnClickListener e;
|
|
|
|
@FunctionalInterface
|
|
/* renamed from: o.exa$HBt */
|
|
/* loaded from: classes5.dex */
|
|
public interface HBt {
|
|
void c(boolean z);
|
|
}
|
|
|
|
public AbstractC12404exa(C16148leh c16148leh) {
|
|
super(null);
|
|
this.a = new ArrayList();
|
|
this.d = false;
|
|
this.c = c16148leh;
|
|
this.e = new View.OnClickListener(this) { // from class: o.ewZ
|
|
private AbstractC12404exa c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
this.c.e(view);
|
|
}
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
};
|
|
}
|
|
|
|
public final void b(List<T> list) {
|
|
this.a.clear();
|
|
this.a.addAll(list);
|
|
notifyDataSetChanged();
|
|
}
|
|
|
|
public final void d(List<T> list) {
|
|
if (list.isEmpty()) {
|
|
return;
|
|
}
|
|
int size = this.a.size();
|
|
int size2 = list.size();
|
|
this.a.addAll(list);
|
|
notifyItemRangeInserted(size, size2);
|
|
notifyItemChanged(size - 1);
|
|
}
|
|
|
|
public final void c(boolean z, HBt hBt) {
|
|
if (this.d != z) {
|
|
this.d = z;
|
|
if (z) {
|
|
this.a.add(null);
|
|
notifyItemInserted(this.a.size() - 1);
|
|
} else {
|
|
this.a.remove(r2.size() - 1);
|
|
notifyItemRemoved(this.a.size());
|
|
}
|
|
if (hBt != null) {
|
|
hBt.c(this.d);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.Qpt
|
|
public final int d() {
|
|
List<T> list = this.a;
|
|
if (list == null) {
|
|
return 0;
|
|
}
|
|
return list.size();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final void e(View view) {
|
|
RecyclerView.zJl a;
|
|
int adapterPosition;
|
|
if (view.getId() != com.scb.phone.R.id.container || (a = CfC.a(view)) == null || (adapterPosition = a.getAdapterPosition()) == -1) {
|
|
return;
|
|
}
|
|
kIT kit = this.c.j;
|
|
long c = kit == null ? -1L : kit.g.c(adapterPosition);
|
|
int i = (int) c;
|
|
if (((int) (c >>> 32)) == -1) {
|
|
if (!this.c.d(i)) {
|
|
this.c.e();
|
|
kIT kit2 = this.c.j;
|
|
if (kit2 != null) {
|
|
kit2.a(i, false);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
kIT kit3 = this.c.j;
|
|
if (kit3 != null) {
|
|
kit3.e(i, false);
|
|
}
|
|
}
|
|
}
|
|
|
|
public final List<T> a() {
|
|
return this.a;
|
|
}
|
|
}
|