what-the-bank/sources/com/scb/phone/view/fragment/remittance/RemittanceFavouriteTargetFr...

268 lines
9.3 KiB
Java

package com.scb.phone.view.fragment.remittance;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.activity.transferandpay.EditFavouriteActivity;
import com.scb.phone.view.activity.transferandpay.FavouriteSelectedActivity;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.remittance.RemittanceFavouriteTargetFragment;
import com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment;
import java.util.List;
import o.AbstractC1181Xh;
import o.AbstractC13163fSk;
import o.AbstractC14961gcz;
import o.C14866gag;
import o.C14954gcs;
import o.C14957gcv;
import o.InterfaceC12824fIT;
import o.InterfaceC13391fZD;
import o.InterfaceC14894gbR;
import o.cND;
import o.fSQ;
import o.glR;
import o.guQ;
/* loaded from: classes5.dex */
public final class RemittanceFavouriteTargetFragment extends Hilt_RemittanceFavouriteTargetFragment implements InterfaceC12824fIT, View.OnClickListener {
@InterfaceC13391fZD
public cND presenter;
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559651, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
cND cnd = this.presenter;
cND cnd2 = null;
if (cnd == null) {
C14957gcv.a("");
cnd = null;
}
cnd.e((cND) this);
AbstractC13163fSk<Intent> Ge_ = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_HOME_ACTIVITY_REFRESH"));
final Sts sts = new Sts(this);
fSQ<? super Intent> fsq = new fSQ(sts) { // from class: o.fxD
private InterfaceC14894gbR d;
@Override // o.fSQ
public final void c(Object obj) {
RemittanceFavouriteTargetFragment.b(this.d, obj);
}
{
this.d = sts;
}
};
final RVV rvv = RVV.d;
((BaseFragment) this).b = Ge_.subscribe(fsq, new fSQ(rvv) { // from class: o.fxL
private InterfaceC14894gbR a;
@Override // o.fSQ
public final void c(Object obj) {
RemittanceFavouriteTargetFragment.e(this.a, obj);
}
{
this.a = rvv;
}
});
AbstractC13163fSk<Intent> Ge_2 = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_EDIT_FAVORITE_REFRESH"));
final LWm lWm = new LWm(this);
fSQ<? super Intent> fsq2 = new fSQ(lWm) { // from class: o.fxJ
private InterfaceC14894gbR c;
@Override // o.fSQ
public final void c(Object obj) {
RemittanceFavouriteTargetFragment.a(this.c, obj);
}
{
this.c = lWm;
}
};
final IeS ieS = IeS.d;
this.h = Ge_2.subscribe(fsq2, new fSQ(ieS) { // from class: o.fxK
private InterfaceC14894gbR c;
@Override // o.fSQ
public final void c(Object obj) {
RemittanceFavouriteTargetFragment.d(this.c, obj);
}
{
this.c = ieS;
}
});
((FavouriteTargetFragment) this).d = this;
((FavouriteTargetFragment) this).c = this;
cND cnd3 = this.presenter;
if (cnd3 != null) {
cnd2 = cnd3;
} else {
C14957gcv.a("");
}
cnd2.b();
}
/* loaded from: classes5.dex */
final /* synthetic */ class RVV extends C14954gcs implements InterfaceC14894gbR<Throwable, C14866gag> {
public static final RVV d = new RVV();
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
guQ.a(th);
return C14866gag.c;
}
RVV() {
super(1, guQ.class, "w", "w(Ljava/lang/Throwable;)V");
}
}
/* loaded from: classes5.dex */
static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR<Intent, C14866gag> {
private RemittanceFavouriteTargetFragment b;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Intent intent) {
RemittanceFavouriteTargetFragment.d(this.b);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
Sts(RemittanceFavouriteTargetFragment remittanceFavouriteTargetFragment) {
super(1);
this.b = remittanceFavouriteTargetFragment;
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class IeS extends C14954gcs implements InterfaceC14894gbR<Throwable, C14866gag> {
public static final IeS d = new IeS();
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
guQ.a(th);
return C14866gag.c;
}
IeS() {
super(1, guQ.class, "w", "w(Ljava/lang/Throwable;)V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class LWm extends C14954gcs implements InterfaceC14894gbR<Intent, C14866gag> {
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Intent intent) {
Intent intent2 = intent;
C14957gcv.e(intent2, "");
RemittanceFavouriteTargetFragment.axl_((RemittanceFavouriteTargetFragment) this.f, intent2);
return C14866gag.c;
}
LWm(Object obj) {
super(1, obj, RemittanceFavouriteTargetFragment.class, "handleBroadcast", "handleBroadcast(Landroid/content/Intent;)V");
}
}
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
cND cnd = this.presenter;
if (cnd == null) {
C14957gcv.a("");
cnd = null;
}
cnd.w_();
super.onDestroy();
}
@Override // o.InterfaceC12824fIT
public final void a(int i) {
cND cnd = this.presenter;
if (cnd == null) {
C14957gcv.a("");
cnd = null;
}
cnd.c("REMITTANCE", i);
Intent intent = new Intent(getContext(), (Class<?>) FavouriteSelectedActivity.class);
intent.putExtra("source", "favourite");
startActivity(intent);
}
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, o.InterfaceC9010dbe.Heg
public final void d(List<? extends AbstractC1181Xh> list) {
super.d(list);
Object[] objArr = new Object[1];
objArr[0] = Integer.valueOf(list != null ? list.size() : 0);
u(getString(R.string.favorite, objArr));
}
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, o.InterfaceC9010dbe.Heg
public final void e() {
d();
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
Intent intent = new Intent(getContext(), (Class<?>) EditFavouriteActivity.class);
intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_remittance_title));
intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "REMITTANCE");
startActivity(intent);
}
public static /* synthetic */ void d(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void b(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void e(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void a(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static final /* synthetic */ void axl_(RemittanceFavouriteTargetFragment remittanceFavouriteTargetFragment, Intent intent) {
if (C14957gcv.b((Object) "REMITTANCE", (Object) intent.getStringExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE"))) {
cND cnd = remittanceFavouriteTargetFragment.presenter;
if (cnd == null) {
C14957gcv.a("");
cnd = null;
}
cnd.b();
}
}
public static final /* synthetic */ void d(RemittanceFavouriteTargetFragment remittanceFavouriteTargetFragment) {
cND cnd = remittanceFavouriteTargetFragment.presenter;
if (cnd == null) {
C14957gcv.a("");
cnd = null;
}
cnd.b();
}
}