what-the-bank/sources/com/scb/phone/view/fragment/investment/FundActionsSuccessFragment....

290 lines
9.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.investment;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.OnClick;
import butterknife.Optional;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.investment.FundActionsSuccessActivity;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.fragment.investment.FundActionsSuccessFragment;
import java.util.concurrent.Callable;
import o.AbstractC13163fSk;
import o.C12945fLw;
import o.C13417fZt;
import o.C13702ffM;
import o.C14957gcv;
import o.C5790bzh;
import o.EnumC8951daY;
import o.InterfaceC13391fZD;
import o.InterfaceC15577gud;
import o.InterfaceC6667cZj;
import o.OI;
import o.OR;
import o.fRR;
import o.fSJ;
import o.fSQ;
import o.guQ;
/* loaded from: classes5.dex */
public class FundActionsSuccessFragment extends Hilt_FundActionsSuccessFragment implements InterfaceC6667cZj.IeS {
@BindView
Button btInvestmentSaveSlip;
private boolean c = false;
private fSJ d;
private OI f;
@BindView
ImageView successIcon;
@InterfaceC13391fZD
public C5790bzh successPresenter;
@BindView
ImageView successScheduleIcon;
@InterfaceC13391fZD
public C12945fLw successScreenshotHelper;
@BindView
TextView tvRemainingBalance;
@BindView
TextView tvScheduleNote;
/* JADX WARN: Removed duplicated region for block: B:16:0x007d */
/* JADX WARN: Removed duplicated region for block: B:21:0x00b5 */
/* JADX WARN: Removed duplicated region for block: B:26:0x00cc */
/* JADX WARN: Removed duplicated region for block: B:29:0x00db */
@Override // androidx.fragment.app.Fragment
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public android.view.View onCreateView(android.view.LayoutInflater r5, android.view.ViewGroup r6, android.os.Bundle r7) {
/*
Method dump skipped, instructions count: 259
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.investment.FundActionsSuccessFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):android.view.View");
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.successPresenter.w_();
fSJ fsj = this.d;
if (fsj != null) {
fsj.dispose();
}
super.onDestroy();
}
@Override // androidx.fragment.app.Fragment
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
C13702ffM.a(this, i, iArr);
}
public final void e(final boolean z) {
final Context context = getContext();
if (isDetached() || context == null) {
return;
}
final C12945fLw c12945fLw = this.successScreenshotHelper;
final OI oi = this.f;
final String str = "ACCOUNT_MASKING_SLIP";
C14957gcv.e(oi, "");
C14957gcv.e(context, "");
C14957gcv.e("ACCOUNT_MASKING_SLIP", "");
AbstractC13163fSk subscribeOn = AbstractC13163fSk.fromCallable(new Callable(c12945fLw, oi, context, str, z) { // from class: o.fLB
private boolean a;
private String b;
private OI c;
private C12945fLw d;
private Context e;
@Override // java.util.concurrent.Callable
public final Object call() {
Uri aAD_;
aAD_ = C12945fLw.aAD_(this.d, this.c, this.e, this.b, this.a);
return aAD_;
}
{
this.d = c12945fLw;
this.c = oi;
this.e = context;
this.b = str;
this.a = z;
}
}).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
C14957gcv.c(subscribeOn, "");
this.d = subscribeOn.subscribe(new fSQ(this) { // from class: o.ffL
private FundActionsSuccessFragment d;
@Override // o.fSQ
public final void c(Object obj) {
FundActionsSuccessFragment.auq_(this.d, (Uri) obj);
}
{
this.d = this;
}
}, new fSQ(this) { // from class: o.ffQ
private FundActionsSuccessFragment d;
@Override // o.fSQ
public final void c(Object obj) {
FundActionsSuccessFragment.e(this.d, (Throwable) obj);
}
{
this.d = this;
}
});
}
public final void a(final InterfaceC15577gud interfaceC15577gud) {
guQ.b("onShowRationale", new Object[0]);
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.permission_storage_title).d(R.string.permission_storage).aoT_(R.string.permission_allow, new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.ffN
private InterfaceC15577gud a;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.a.c();
}
{
this.a = interfaceC15577gud;
}
}), Integer.valueOf(R.string.permission_deny), new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.ffO
private InterfaceC15577gud a;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.a.e();
}
{
this.a = interfaceC15577gud;
}
}})).show();
}
public static void f() {
guQ.b("onPermissionDenied", new Object[0]);
}
public static void i() {
guQ.b("onPermissionDeniedAndroid13", new Object[0]);
}
public static void j() {
guQ.b("onNeverAskAgain", new Object[0]);
}
public static void h() {
guQ.b("onNeverAskAgainAndroid13", new Object[0]);
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
@Optional
public void onReturnHomeClick() {
if (getActivity() instanceof FundActionsSuccessActivity) {
U();
}
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
public void onSaveSlipButton() {
this.c = true;
c(true);
}
@Override // o.InterfaceC6667cZj.IeS
public final void b() {
this.c = true;
this.btInvestmentSaveSlip.setVisibility(8);
c(false);
}
@Override // o.InterfaceC6667cZj.IeS
public final void e() {
this.c = false;
this.btInvestmentSaveSlip.setVisibility(0);
}
@Override // o.InterfaceC6667cZj.IeS
public final void d() {
this.successScheduleIcon.setImageResource(R.drawable.ic_scheduled_successful);
this.successIcon.setVisibility(8);
this.successScheduleIcon.setVisibility(0);
}
@Override // o.InterfaceC6667cZj.IeS
public final void c() {
this.btInvestmentSaveSlip.setVisibility(8);
}
@Override // o.InterfaceC6667cZj.IeS
public final void a() {
this.tvRemainingBalance.setVisibility(8);
}
@Override // o.InterfaceC6667cZj.IeS
public final void e(OR or) {
this.switchDate.setVisibility(8);
b(or);
}
public static /* synthetic */ void auq_(FundActionsSuccessFragment fundActionsSuccessFragment, Uri uri) {
if (uri.toString().isEmpty() || !fundActionsSuccessFragment.getUserVisibleHint() || fundActionsSuccessFragment.getActivity() == null || !fundActionsSuccessFragment.c) {
return;
}
EnumC8951daY enumC8951daY = EnumC8951daY.SUCCESS;
FragmentActivity activity = fundActionsSuccessFragment.getActivity();
if (activity != null) {
String string = fundActionsSuccessFragment.getString(R.string.saved_slip);
if (fundActionsSuccessFragment.getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) fundActionsSuccessFragment.getActivity(), activity, Integer.valueOf(R.id.investment_success_container), string, enumC8951daY}, 855668825, -855668822, R.id.investment_success_container);
}
}
fundActionsSuccessFragment.c = false;
}
public static /* synthetic */ void e(FundActionsSuccessFragment fundActionsSuccessFragment, Throwable th) {
guQ.a(th, "onSaveScreenshotError", new Object[0]);
if (fundActionsSuccessFragment.isDetached() || fundActionsSuccessFragment.getActivity() == null) {
return;
}
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
FragmentActivity activity = fundActionsSuccessFragment.getActivity();
if (activity != null) {
String string = fundActionsSuccessFragment.getString(R.string.saved_slip_error);
if (fundActionsSuccessFragment.getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) fundActionsSuccessFragment.getActivity(), activity, Integer.valueOf(R.id.investment_success_container), string, enumC8951daY}, 855668825, -855668822, R.id.investment_success_container);
}
}
}
private void c(boolean z) {
if (getActivity() != null) {
if (BaseActivity.P()) {
C13702ffM.c(this, z);
return;
}
}
C13702ffM.a(this, z);
}
}