211 lines
8.0 KiB
Java
211 lines
8.0 KiB
Java
|
package com.scb.phone.view.fragment.transferandpay;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.graphics.PorterDuff;
|
||
|
import android.text.TextUtils;
|
||
|
import android.view.View;
|
||
|
import android.widget.ImageView;
|
||
|
import android.widget.RelativeLayout;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomNoteItem;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomPhotoLeftDetails;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget;
|
||
|
import java.util.Iterator;
|
||
|
import o.C1168Xb;
|
||
|
import o.C1189Xo;
|
||
|
import o.C1191Xp;
|
||
|
import o.C1204Xz;
|
||
|
import o.WO;
|
||
|
import o.XL;
|
||
|
import o.nMh;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class BaseSuccessFragment extends Hilt_BaseSuccessFragment {
|
||
|
|
||
|
@BindView
|
||
|
CustomNoteItem edonationRemark;
|
||
|
|
||
|
@BindView
|
||
|
CustomPhotoLeftDetails giftDetails;
|
||
|
|
||
|
@BindView
|
||
|
CustomNoteItem messageDetails;
|
||
|
|
||
|
@BindView
|
||
|
TextView slipQRCodeDescriptionTextView;
|
||
|
|
||
|
@BindView
|
||
|
ImageView slipQRCodeImageView;
|
||
|
|
||
|
@BindView
|
||
|
RelativeLayout slipQRSection;
|
||
|
|
||
|
@BindView
|
||
|
ImageView successIcon;
|
||
|
|
||
|
@BindView
|
||
|
TextView textDateTime;
|
||
|
|
||
|
@BindView
|
||
|
TextView textReferenceId;
|
||
|
|
||
|
@BindView
|
||
|
TextView textTitle;
|
||
|
|
||
|
public final boolean D() {
|
||
|
String O = O();
|
||
|
return "bill_payment".equals(O) || "ebill".equals(O) || "gifting".equals(O) || "sf".equals(O) || "deals".equals(O);
|
||
|
}
|
||
|
|
||
|
public void a(C1191Xp c1191Xp, View view, Context context) {
|
||
|
String str;
|
||
|
super.a(c1191Xp.p, view, context);
|
||
|
ButterKnife.c(this, view);
|
||
|
this.textTitle.setText(c1191Xp.s);
|
||
|
this.textDateTime.setText(c1191Xp.f);
|
||
|
this.textReferenceId.setText(c1191Xp.r);
|
||
|
if (c1191Xp.f8452o) {
|
||
|
this.customSource.setDivider(true);
|
||
|
this.customSource.setFullDivider(true);
|
||
|
this.customFees.mDividerView.setVisibility(0);
|
||
|
this.customFees.setFullDivider(true);
|
||
|
this.customFees.mTopSpace.setVisibility(0);
|
||
|
this.customAmount.mDividerView.setVisibility(0);
|
||
|
this.customAmount.setFullDivider(true);
|
||
|
this.customAmount.mBottomSpace.setVisibility(c1191Xp.p.j == null ? 0 : 8);
|
||
|
} else {
|
||
|
this.customSource.setDivider(false);
|
||
|
this.customSource.setFullDivider(false);
|
||
|
this.customFees.mTopSpace.setVisibility(8);
|
||
|
this.customAmount.mDividerView.setVisibility(8);
|
||
|
this.customAmount.setFullDivider(true);
|
||
|
this.customAmount.amountInfo.setVisibility(8);
|
||
|
}
|
||
|
this.fullDivider.setVisibility(8);
|
||
|
this.customTarget.setFullDivider(true);
|
||
|
this.customDue.setFullDivider(true);
|
||
|
this.userNote.setFullDivider(true);
|
||
|
this.userNote.d();
|
||
|
this.billerNote.setFullDivider(true);
|
||
|
C1189Xo c1189Xo = c1191Xp.p;
|
||
|
if (c1189Xo.at != null) {
|
||
|
this.successIcon.setImageResource(R.drawable.ic_scheduled_successful);
|
||
|
CustomTransferAndPayTarget customTransferAndPayTarget = this.customTarget;
|
||
|
customTransferAndPayTarget.mFavouriteIcon.setVisibility(8);
|
||
|
customTransferAndPayTarget.mFavouriteName.setVisibility(8);
|
||
|
} else {
|
||
|
this.successIcon.getDrawable().mutate().setColorFilter(nMh.getColor(context, R.color.f3432131099851), PorterDuff.Mode.SRC_ATOP);
|
||
|
}
|
||
|
WO wo = c1189Xo.C;
|
||
|
if (wo == null) {
|
||
|
boolean d = d(c1191Xp);
|
||
|
String j = c1189Xo.j();
|
||
|
if (j != null) {
|
||
|
if (j.equalsIgnoreCase("LOANPAYMENT")) {
|
||
|
this.customFees.setVisibility(8);
|
||
|
CustomTransferAndPayItem customTransferAndPayItem = this.customAmount;
|
||
|
C1168Xb c1168Xb = c1189Xo.j;
|
||
|
customTransferAndPayItem.amountInfo.setVisibility(0);
|
||
|
customTransferAndPayItem.amountInfo.setValuesAligned(c1168Xb, true);
|
||
|
this.customAmount.setText(context.getString(R.string.total_amount));
|
||
|
this.customAmount.mDividerView.setVisibility(0);
|
||
|
this.customAmount.mBottomSpace.setVisibility(c1189Xo.j == null ? 0 : 8);
|
||
|
return;
|
||
|
}
|
||
|
if (j.equalsIgnoreCase("TRANSFER") && d) {
|
||
|
this.customFees.mDividerView.setVisibility(this.userNote.getVisibility() == 0 ? 0 : 8);
|
||
|
this.userNote.divider.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
if (j.equalsIgnoreCase("rtp.payer") || j.equalsIgnoreCase("rtp.payer.notification") || j.equalsIgnoreCase("RTP_EBILL_PAYMENT_FUNCTION")) {
|
||
|
c(R.string.from, context);
|
||
|
return;
|
||
|
} else if (j.equalsIgnoreCase("BNPL_PAYMENT")) {
|
||
|
this.customSource.tvSourceAccountBalance.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if (c1189Xo.aE == null || !c1189Xo.aE.equalsIgnoreCase("E_DONATION_FUNCTION")) {
|
||
|
String str2 = c1189Xo.p;
|
||
|
if (str2 != null && str2.equalsIgnoreCase("PREPAID") && c1189Xo.F) {
|
||
|
this.customTarget.setAddFavoriteButtonVisible(false);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
C1204Xz i = c1189Xo.i();
|
||
|
if (i != null) {
|
||
|
this.edonationRemark.setVisibility(0);
|
||
|
this.customFees.mDividerView.setVisibility(0);
|
||
|
this.userNote.divider.setVisibility(0);
|
||
|
this.billerNote.divider.setVisibility(0);
|
||
|
this.edonationRemark.divider.setVisibility(8);
|
||
|
this.edonationRemark.setTitle(i.b);
|
||
|
this.edonationRemark.setText(i.c);
|
||
|
return;
|
||
|
}
|
||
|
this.edonationRemark.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
this.customTarget.setAddFavoriteButtonVisible(false);
|
||
|
this.giftDetails.setVisibility(0);
|
||
|
this.customFees.mDividerView.setVisibility(0);
|
||
|
this.giftDetails.setHeader(wo.m);
|
||
|
CustomPhotoLeftDetails customPhotoLeftDetails = this.giftDetails;
|
||
|
if (wo.a != null) {
|
||
|
str = wo.a;
|
||
|
} else {
|
||
|
str = wo.d;
|
||
|
}
|
||
|
customPhotoLeftDetails.setImageView(str);
|
||
|
if (!TextUtils.isEmpty(wo.j)) {
|
||
|
this.giftDetails.setTitle(wo.j);
|
||
|
if (!TextUtils.isEmpty(wo.c)) {
|
||
|
this.giftDetails.setSecondText(wo.c);
|
||
|
}
|
||
|
} else if (!TextUtils.isEmpty(wo.c)) {
|
||
|
this.giftDetails.setTitle(wo.c);
|
||
|
}
|
||
|
if (!TextUtils.isEmpty(wo.h)) {
|
||
|
this.giftDetails.setThirdText(wo.h);
|
||
|
}
|
||
|
if (!TextUtils.isEmpty(wo.g)) {
|
||
|
this.giftDetails.setFourth(wo.g);
|
||
|
}
|
||
|
if (wo.b == null || wo.b.isEmpty()) {
|
||
|
CustomPhotoLeftDetails customPhotoLeftDetails2 = this.giftDetails;
|
||
|
customPhotoLeftDetails2.dividirView.setVisibility(8);
|
||
|
customPhotoLeftDetails2.dividirFullView.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
CustomPhotoLeftDetails customPhotoLeftDetails3 = this.giftDetails;
|
||
|
customPhotoLeftDetails3.dividirView.setVisibility(8);
|
||
|
customPhotoLeftDetails3.dividirFullView.setVisibility(0);
|
||
|
this.messageDetails.setVisibility(0);
|
||
|
this.messageDetails.setTitle(wo.i);
|
||
|
this.messageDetails.setText(wo.b);
|
||
|
this.messageDetails.d();
|
||
|
this.messageDetails.divider.setVisibility(8);
|
||
|
}
|
||
|
|
||
|
public static boolean d(C1191Xp c1191Xp) {
|
||
|
if (c1191Xp.j != null) {
|
||
|
Iterator<XL> it = c1191Xp.j.b.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
if (!TextUtils.isEmpty(it.next().i)) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public static boolean a(C1191Xp c1191Xp) {
|
||
|
return (c1191Xp == null || c1191Xp.p == null || c1191Xp.p.P == null || !"BILLPAYMENT".equals(c1191Xp.p.j())) ? false : true;
|
||
|
}
|
||
|
}
|