305 lines
10 KiB
Java
305 lines
10 KiB
Java
|
package com.scb.phone.view.fragment.transferandpay.transfer;
|
||
|
|
||
|
import android.content.DialogInterface;
|
||
|
import android.content.Intent;
|
||
|
import android.content.IntentFilter;
|
||
|
import android.os.Bundle;
|
||
|
import android.os.SystemClock;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.adapter.transferandpay.transfer.TransferToOthersStep1Adapter;
|
||
|
import com.scb.phone.view.custom.common.CustomDialog;
|
||
|
import com.scb.phone.view.fragment.BaseFragment;
|
||
|
import com.scb.phone.view.fragment.transferandpay.transfer.TransferToOthersStep1Fragment;
|
||
|
import java.util.List;
|
||
|
import o.AbstractC1237Yr;
|
||
|
import o.AbstractC17051tZJ;
|
||
|
import o.C0690Mh;
|
||
|
import o.C10457eEr;
|
||
|
import o.C1223Yj;
|
||
|
import o.C1233Yp;
|
||
|
import o.C1236Yq;
|
||
|
import o.C16903sI;
|
||
|
import o.C6599cXk;
|
||
|
import o.EH;
|
||
|
import o.GEP;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9010dbe;
|
||
|
import o.Jel;
|
||
|
import o.YKU;
|
||
|
import o.ZI;
|
||
|
import o.fSJ;
|
||
|
import o.fSQ;
|
||
|
import o.glR;
|
||
|
import o.zEQ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class TransferToOthersStep1Fragment extends Hilt_TransferToOthersStep1Fragment implements InterfaceC9010dbe.jzh {
|
||
|
private fSJ c;
|
||
|
private fSJ g;
|
||
|
private long j;
|
||
|
|
||
|
@BindView
|
||
|
ConstraintLayout layoutError;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C6599cXk presenter;
|
||
|
|
||
|
@BindView
|
||
|
RecyclerView recyclerView;
|
||
|
private boolean h = false;
|
||
|
private boolean d = false;
|
||
|
|
||
|
public static TransferToOthersStep1Fragment d() {
|
||
|
return new TransferToOthersStep1Fragment();
|
||
|
}
|
||
|
|
||
|
public static TransferToOthersStep1Fragment g() {
|
||
|
Bundle bundle = new Bundle();
|
||
|
TransferToOthersStep1Fragment transferToOthersStep1Fragment = new TransferToOthersStep1Fragment();
|
||
|
transferToOthersStep1Fragment.d = true;
|
||
|
transferToOthersStep1Fragment.setArguments(bundle);
|
||
|
return transferToOthersStep1Fragment;
|
||
|
}
|
||
|
|
||
|
public static TransferToOthersStep1Fragment d(String str, AbstractC1237Yr abstractC1237Yr) {
|
||
|
Bundle bundle = new Bundle();
|
||
|
bundle.putString("com.scb.phone.EXTRA_TRANSFER_FUNCTION", str);
|
||
|
bundle.putParcelable("fixed_transfer_display", abstractC1237Yr);
|
||
|
TransferToOthersStep1Fragment transferToOthersStep1Fragment = new TransferToOthersStep1Fragment();
|
||
|
transferToOthersStep1Fragment.setArguments(bundle);
|
||
|
return transferToOthersStep1Fragment;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559971, viewGroup, false);
|
||
|
((BaseFragment) this).a = ButterKnife.c(this, inflate);
|
||
|
this.recyclerView.setHasFixedSize(true);
|
||
|
((AbstractC17051tZJ) this.recyclerView.t).setSupportsChangeAnimations(false);
|
||
|
if (getArguments() != null) {
|
||
|
Bundle arguments = getArguments();
|
||
|
if ((arguments != null ? arguments.getString("com.scb.phone.EXTRA_TRANSFER_FUNCTION", "TRANSFER") : "TRANSFER").equals("FIXED_TRANSFER")) {
|
||
|
this.h = true;
|
||
|
}
|
||
|
}
|
||
|
this.presenter.e((C6599cXk) this);
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public void onStart() {
|
||
|
super.onStart();
|
||
|
this.g = glR.Ge_(getContext(), new IntentFilter("FAVORITE")).subscribe(new fSQ(this) { // from class: o.fHz
|
||
|
private TransferToOthersStep1Fragment a;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
TransferToOthersStep1Fragment.e(this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.fHw
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
this.c = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_BANK_RECEIVED")).subscribe(new fSQ(this) { // from class: o.fHH
|
||
|
private TransferToOthersStep1Fragment a;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
r0.presenter.a(r0.W(), r0.h, this.a.d);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.fHw
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public void onStop() {
|
||
|
fSJ fsj = this.g;
|
||
|
if (fsj != null && !fsj.isDisposed()) {
|
||
|
this.g.dispose();
|
||
|
}
|
||
|
fSJ fsj2 = this.c;
|
||
|
if (fsj2 != null && !fsj2.isDisposed()) {
|
||
|
this.c.dispose();
|
||
|
}
|
||
|
super.onStop();
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
this.presenter.w_();
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9010dbe.jzh
|
||
|
public final void b(List<C1236Yq> list) {
|
||
|
if (list.isEmpty()) {
|
||
|
this.layoutError.setVisibility(0);
|
||
|
this.recyclerView.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
this.layoutError.setVisibility(8);
|
||
|
this.recyclerView.setVisibility(0);
|
||
|
TransferToOthersStep1Adapter transferToOthersStep1Adapter = new TransferToOthersStep1Adapter(list, new TransferToOthersStep1Adapter.HBt(this) { // from class: o.fHy
|
||
|
private TransferToOthersStep1Fragment a;
|
||
|
|
||
|
@Override // com.scb.phone.view.adapter.transferandpay.transfer.TransferToOthersStep1Adapter.HBt
|
||
|
public final void e(C1236Yq c1236Yq) {
|
||
|
this.a.d(c1236Yq, false);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
}
|
||
|
}, new TransferToOthersStep1Adapter.RVV(this) { // from class: o.fHA
|
||
|
private TransferToOthersStep1Fragment e;
|
||
|
|
||
|
@Override // com.scb.phone.view.adapter.transferandpay.transfer.TransferToOthersStep1Adapter.RVV
|
||
|
public final void d(C1236Yq c1236Yq) {
|
||
|
CustomDialog b = CustomDialog.b(this.e.getContext());
|
||
|
String str = c1236Yq.c;
|
||
|
if (gjJ.a(str)) {
|
||
|
b.mTitleTextView.setVisibility(0);
|
||
|
b.mTitleTextView.setText(str);
|
||
|
}
|
||
|
String str2 = c1236Yq.b;
|
||
|
if (gjJ.a(str2)) {
|
||
|
b.mTextTextView.setVisibility(0);
|
||
|
b.mTextTextView.setText(str2);
|
||
|
}
|
||
|
b.aoT_(com.scb.phone.R.string.ok, new DialogInterface.OnClickListener() { // from class: o.fHx
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
dialogInterface.dismiss();
|
||
|
}
|
||
|
}).show();
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
}
|
||
|
});
|
||
|
transferToOthersStep1Adapter.setHasStableIds(true);
|
||
|
this.recyclerView.setAdapter(transferToOthersStep1Adapter);
|
||
|
this.recyclerView.setNestedScrollingEnabled(false);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9010dbe.jzh
|
||
|
public final void c(C1236Yq c1236Yq) {
|
||
|
d(c1236Yq, true);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9010dbe.jzh
|
||
|
public final void a(C1233Yp c1233Yp, String str) {
|
||
|
if (SystemClock.elapsedRealtime() - this.j < 300) {
|
||
|
return;
|
||
|
}
|
||
|
this.j = SystemClock.elapsedRealtime();
|
||
|
EH eh = this.presenter.d;
|
||
|
b(EH.a(c1233Yp, str), true);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9010dbe.jzh
|
||
|
public final void e() {
|
||
|
C6599cXk c6599cXk = this.presenter;
|
||
|
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
|
||
|
C16903sI c16903sI = c6599cXk.j;
|
||
|
c6599cXk.d(c16903sI.c((String) null, c16903sI.e(R.string.bank_not_found), ieS));
|
||
|
}
|
||
|
|
||
|
public final void d(C1236Yq c1236Yq, boolean z) {
|
||
|
if (SystemClock.elapsedRealtime() - this.j < 300) {
|
||
|
return;
|
||
|
}
|
||
|
this.j = SystemClock.elapsedRealtime();
|
||
|
EH eh = this.presenter.d;
|
||
|
b(EH.a(c1236Yq), z);
|
||
|
}
|
||
|
|
||
|
private void b(AbstractC1237Yr abstractC1237Yr, boolean z) {
|
||
|
Intent intent;
|
||
|
if (z) {
|
||
|
intent = new Intent("com.scb.phone/BROADCAST_TRANSFER_NEXT_FAVOURITE_STEP");
|
||
|
} else {
|
||
|
intent = new Intent("com.scb.phone/BROADCAST_TRANSFER_NEXT_STEP");
|
||
|
}
|
||
|
if (getArguments() != null && this.h) {
|
||
|
AbstractC1237Yr abstractC1237Yr2 = (AbstractC1237Yr) getArguments().getParcelable("fixed_transfer_display");
|
||
|
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_FUNCTION", "FIXED_TRANSFER");
|
||
|
intent.putExtra("fixed_transfer_display", new C1223Yj().d(abstractC1237Yr2));
|
||
|
}
|
||
|
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TARGET_DATA", abstractC1237Yr);
|
||
|
C10457eEr.aqd_(this, intent);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@OnClick
|
||
|
public void onReloadClick() {
|
||
|
this.presenter.a(W(), this.h, this.d);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void e(TransferToOthersStep1Fragment transferToOthersStep1Fragment) {
|
||
|
final zEQ d;
|
||
|
C6599cXk c6599cXk = transferToOthersStep1Fragment.presenter;
|
||
|
final String str = c6599cXk.b.a.n().x;
|
||
|
YKU yku = new YKU(c6599cXk.c);
|
||
|
YKU yku2 = new YKU(yku.a, new GEP(yku.b, new Jel(str) { // from class: o.cXD
|
||
|
private String b;
|
||
|
|
||
|
@Override // o.Jel
|
||
|
public final boolean e(Object obj) {
|
||
|
boolean equals;
|
||
|
equals = this.b.equals(((C1236Yq) obj).d.c);
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = str;
|
||
|
}
|
||
|
}));
|
||
|
if (yku2.b.hasNext()) {
|
||
|
d = zEQ.a(yku2.b.next());
|
||
|
} else {
|
||
|
d = zEQ.d();
|
||
|
}
|
||
|
if (d.d != 0) {
|
||
|
ZI.IeS ieS = new ZI.IeS(d) { // from class: o.cXF
|
||
|
private zEQ e;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C6599cXk.b(this.e, (InterfaceC9010dbe.jzh) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = d;
|
||
|
}
|
||
|
};
|
||
|
if (c6599cXk.f != 0) {
|
||
|
ieS.e(c6599cXk.f);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|