157 lines
5.0 KiB
Java
157 lines
5.0 KiB
Java
|
package com.scb.phone.view.fragment.hml;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.os.SystemClock;
|
||
|
import android.text.Html;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.Button;
|
||
|
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.hml.HmlETBManageEmailVerificationActivity;
|
||
|
import o.C0693Mj;
|
||
|
import o.C14957gcv;
|
||
|
import o.C16018kXg;
|
||
|
import o.C16709qZO;
|
||
|
import o.C5584bvn;
|
||
|
import o.EnumC8951daY;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9302dhF;
|
||
|
import o.ZI;
|
||
|
import o.pug;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class HmlVerifyEmailFragment extends Hilt_HmlVerifyEmailFragment implements InterfaceC9302dhF {
|
||
|
|
||
|
@BindView
|
||
|
Button confirmButton;
|
||
|
|
||
|
@BindView
|
||
|
TextView emailView;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C5584bvn presenter;
|
||
|
|
||
|
public static HmlVerifyEmailFragment i() {
|
||
|
return new HmlVerifyEmailFragment();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559722, (ViewGroup) null, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public void send() {
|
||
|
final C5584bvn c5584bvn = this.presenter;
|
||
|
if (c5584bvn.a == C5584bvn.Sts.ENTER_VERIFICATION_CODE) {
|
||
|
ZI.IeS ieS = new ZI.IeS(c5584bvn) { // from class: o.bvm
|
||
|
private C5584bvn e;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C5584bvn.b(this.e, (InterfaceC9302dhF) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = c5584bvn;
|
||
|
}
|
||
|
};
|
||
|
if (c5584bvn.f != 0) {
|
||
|
ieS.e(c5584bvn.f);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (SystemClock.elapsedRealtime() - c5584bvn.b < 60000) {
|
||
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bvk
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9302dhF) obj).c();
|
||
|
}
|
||
|
};
|
||
|
if (c5584bvn.f != 0) {
|
||
|
ieS2.e(c5584bvn.f);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
c5584bvn.b = SystemClock.elapsedRealtime();
|
||
|
if (c5584bvn.f != 0) {
|
||
|
c5584bvn.f.y();
|
||
|
}
|
||
|
C16709qZO c16709qZO = c5584bvn.d;
|
||
|
c16709qZO.d(c16709qZO.d(), new C5584bvn.LWm(c5584bvn));
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public void onStart() {
|
||
|
this.presenter.e((C5584bvn) this);
|
||
|
C5584bvn c5584bvn = this.presenter;
|
||
|
if (c5584bvn.f != 0) {
|
||
|
c5584bvn.f.y();
|
||
|
}
|
||
|
C16018kXg c16018kXg = c5584bvn.e;
|
||
|
c16018kXg.d(c16018kXg.b(), new C5584bvn.RVV(c5584bvn));
|
||
|
super.onStart();
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
this.presenter.w_();
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9302dhF
|
||
|
public final void a() {
|
||
|
this.confirmButton.setText(R.string.hml_verify_email_button);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9302dhF
|
||
|
public final void e(String str) {
|
||
|
this.emailView.setText(Html.fromHtml(getString(R.string.hml_verify_email_text, str)));
|
||
|
}
|
||
|
|
||
|
public void e(String str, String str2, String str3) {
|
||
|
j(getString(R.string.hml_manage_email_verification_sent));
|
||
|
c("p10x1_email_verify_OTP", new pug("user_type", "etb"));
|
||
|
HmlETBManageEmailVerificationActivity.LWm lWm = HmlETBManageEmailVerificationActivity.b;
|
||
|
Context context = getContext();
|
||
|
C14957gcv.e(context, "");
|
||
|
C14957gcv.e(str, "");
|
||
|
C14957gcv.e(str2, "");
|
||
|
C14957gcv.e(str3, "");
|
||
|
Intent intent = new Intent(context, (Class<?>) HmlETBManageEmailVerificationActivity.class);
|
||
|
intent.putExtra("EXTRA_UUID", str);
|
||
|
intent.putExtra("EXTRA_REFID", str2);
|
||
|
intent.putExtra("EXTRA_EMAIL", str3);
|
||
|
intent.putExtra("EXTRA_FLOW", true);
|
||
|
startActivity(intent);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9302dhF
|
||
|
public final void b(C0693Mj c0693Mj) {
|
||
|
e(c0693Mj);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9302dhF
|
||
|
public final void c() {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
String string = getString(R.string.manage_email_otp_resend_error);
|
||
|
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
|
||
|
if (getActivity() != null) {
|
||
|
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), activity, Integer.valueOf(R.id.view_group_root), string, enumC8951daY}, 855668825, -855668822, R.id.view_group_root);
|
||
|
}
|
||
|
}
|
||
|
}
|