209 lines
6.8 KiB
Java
209 lines
6.8 KiB
Java
|
package com.scb.phone.view.fragment.ndid;
|
||
|
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.text.method.LinkMovementMethod;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.fragment.app.FragmentActivity;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.BaseActivity;
|
||
|
import com.scb.phone.view.activity.ndid.NdidSelectIdpActivity;
|
||
|
import com.scb.phone.view.activity.ntb.ReviewInfoResultActivity;
|
||
|
import com.scb.phone.view.fragment.ndid.NdidSelectIdpSuccessFragment;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.C0690Mh;
|
||
|
import o.C15715hv;
|
||
|
import o.C17046tXv;
|
||
|
import o.C6711caa;
|
||
|
import o.IFW;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9489dkh;
|
||
|
import o.ZI;
|
||
|
import o.oHi;
|
||
|
import o.tXL;
|
||
|
import o.wRi;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class NdidSelectIdpSuccessFragment extends Hilt_NdidSelectIdpSuccessFragment implements InterfaceC9489dkh {
|
||
|
private IFW c = new IFW();
|
||
|
|
||
|
@BindView
|
||
|
TextView header;
|
||
|
|
||
|
@BindView
|
||
|
TextView idpDescription;
|
||
|
|
||
|
@BindView
|
||
|
TextView idpGeneralDescription;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C6711caa presenter;
|
||
|
|
||
|
public static NdidSelectIdpSuccessFragment b(List<String> list) {
|
||
|
Bundle bundle = new Bundle();
|
||
|
bundle.putStringArrayList("REMARKS", new ArrayList<>(list));
|
||
|
NdidSelectIdpSuccessFragment ndidSelectIdpSuccessFragment = new NdidSelectIdpSuccessFragment();
|
||
|
ndidSelectIdpSuccessFragment.setArguments(bundle);
|
||
|
return ndidSelectIdpSuccessFragment;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public void onViewCreated(View view, Bundle bundle) {
|
||
|
super.onViewCreated(view, bundle);
|
||
|
this.c.d("feature", f());
|
||
|
IFW ifw = this.c;
|
||
|
if (getActivity() != null) {
|
||
|
ifw.c(((BaseActivity) getActivity()).scbAnalytics, "ndid_rp_verified");
|
||
|
}
|
||
|
X();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559785, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
this.presenter.e((C6711caa) this);
|
||
|
C6711caa c6711caa = this.presenter;
|
||
|
final ArrayList<String> stringArrayList = getArguments().getStringArrayList("REMARKS");
|
||
|
ZI.IeS ieS = new ZI.IeS(stringArrayList) { // from class: o.cac
|
||
|
private List a;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9489dkh) obj).a(this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = stringArrayList;
|
||
|
}
|
||
|
};
|
||
|
if (c6711caa.f != 0) {
|
||
|
ieS.e(c6711caa.f);
|
||
|
}
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9489dkh
|
||
|
public final void a(List<String> list) {
|
||
|
this.header.setText(list.get(0));
|
||
|
this.idpDescription.setText(list.get(1));
|
||
|
this.idpGeneralDescription.setText(C17046tXv.Qo_(getString(R.string.ndid_select_idp_success_description), getString(R.string.ndid_select_idp_success_clickable_description), getResources(), new C17046tXv.HBt(this) { // from class: o.fpj
|
||
|
private NdidSelectIdpSuccessFragment d;
|
||
|
|
||
|
@Override // o.C17046tXv.HBt
|
||
|
public final void e() {
|
||
|
NdidSelectIdpSuccessFragment.d(this.d);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
}, true, 0, C15715hv.LWm.scb_purple));
|
||
|
this.idpGeneralDescription.setMovementMethod(LinkMovementMethod.getInstance());
|
||
|
this.idpGeneralDescription.setHighlightColor(0);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9489dkh
|
||
|
public final void d() {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
if (activity != null) {
|
||
|
activity.setResult(0);
|
||
|
activity.finish();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9489dkh
|
||
|
public final void b() {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
if (activity != null) {
|
||
|
activity.setResult(-1);
|
||
|
activity.finish();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9489dkh
|
||
|
public final void a() {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
if (activity != null) {
|
||
|
Intent intent = new Intent(activity, (Class<?>) ReviewInfoResultActivity.class);
|
||
|
intent.putExtra("EXTRA_IMAGE_ID", R.drawable.ic_notice);
|
||
|
intent.putExtra("EXTRA_PAGE_TITLE", getString(R.string.ntb_ekyc_title));
|
||
|
intent.putExtra("EXTRA_TITLE", getString(R.string.error_default_title));
|
||
|
intent.putExtra("EXTRA_DESCRIPTION", getString(R.string.ndid_select_idp_error));
|
||
|
startActivity(intent);
|
||
|
activity.finish();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9489dkh
|
||
|
public final void e() {
|
||
|
if (getActivity() != null && ((NdidSelectIdpActivity) getActivity()).getIntent().getBooleanExtra("com.scb.phone.view.activity.ndid.NdidSelectIdpActivity.EXTRA_IS_PENDING", false)) {
|
||
|
aH_();
|
||
|
} else {
|
||
|
getFragmentManager().H();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
this.presenter.w_();
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void d(NdidSelectIdpSuccessFragment ndidSelectIdpSuccessFragment) {
|
||
|
final C6711caa c6711caa = ndidSelectIdpSuccessFragment.presenter;
|
||
|
if (c6711caa.f != 0) {
|
||
|
c6711caa.f.y();
|
||
|
}
|
||
|
tXL txl = c6711caa.a;
|
||
|
txl.d(txl.a(), new wRi.LWm<Void>(c6711caa) { // from class: o.caa.4
|
||
|
private C6711caa d;
|
||
|
|
||
|
{
|
||
|
this.d = c6711caa;
|
||
|
}
|
||
|
|
||
|
@Override // o.wRi.LWm, o.InterfaceC13174fSv
|
||
|
public final void onError(Throwable th) {
|
||
|
C6711caa.d(this.d, th, C0690Mh.IeS.JUST_DISMISS);
|
||
|
}
|
||
|
|
||
|
@Override // o.wRi.LWm, o.InterfaceC13174fSv
|
||
|
public final void onComplete() {
|
||
|
C6711caa.e(this.d);
|
||
|
C6711caa c6711caa2 = this.d;
|
||
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cae
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9489dkh) obj).d();
|
||
|
}
|
||
|
};
|
||
|
if (c6711caa2.f != 0) {
|
||
|
ieS.e(c6711caa2.f);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public void onVerifiedButtonClick() {
|
||
|
C6711caa c6711caa = this.presenter;
|
||
|
if (c6711caa.f != 0) {
|
||
|
c6711caa.f.y();
|
||
|
}
|
||
|
oHi ohi = c6711caa.d;
|
||
|
ohi.d(ohi.b(), new C6711caa.AnonymousClass2(c6711caa));
|
||
|
}
|
||
|
|
||
|
protected String f() {
|
||
|
return "open_account";
|
||
|
}
|
||
|
}
|