what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/topuptab/TopUpBillerFragment.java

149 lines
4.6 KiB
Java

package com.scb.phone.view.fragment.transferandpay.topuptab;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Parcelable;
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.fragment.transferandpay.topuptab.TopUpBillerFragment;
import o.C0690Mh;
import o.C10457eEr;
import o.C1226Yl;
import o.C16903sI;
import o.C6503cUu;
import o.C6508cUz;
import o.InterfaceC13391fZD;
import o.InterfaceC9010dbe;
import o.ZI;
import o.fSJ;
import o.fSQ;
import o.glR;
/* loaded from: classes5.dex */
public class TopUpBillerFragment extends Hilt_TopUpBillerFragment implements InterfaceC9010dbe.ZKJ {
private fSJ d;
@InterfaceC13391fZD
public C6503cUu topUpBillerPresenter;
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559466, viewGroup, false);
ButterKnife.c(this, inflate);
this.topUpBillerPresenter.e((C6503cUu) this);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onStart() {
super.onStart();
this.d = glR.Ge_(getContext(), new IntentFilter("FAVORITE")).subscribe(new fSQ(this) { // from class: o.fGC
private TopUpBillerFragment e;
@Override // o.fSQ
public final void c(Object obj) {
TopUpBillerFragment.d(this.e);
}
{
this.e = this;
}
}, new fSQ() { // from class: o.fGK
@Override // o.fSQ
public final void c(Object obj) {
guQ.a((Throwable) obj);
}
});
}
@Override // androidx.fragment.app.Fragment
public void onStop() {
fSJ fsj = this.d;
if (fsj != null && !fsj.isDisposed()) {
this.d.dispose();
}
super.onStop();
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onActivityCreated(Bundle bundle) {
super.onActivityCreated(bundle);
this.topUpBillerPresenter.b();
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.topUpBillerPresenter.w_();
super.onDestroy();
}
@Override // com.scb.phone.view.fragment.transferandpay.BaseBillersFragment, o.InterfaceC12824fIT
public final void a(int i) {
super.a(i);
e(this.topUpBillerPresenter.e.get(i), false);
}
@Override // com.scb.phone.view.fragment.transferandpay.BaseBillersFragment
public void onEmptyLayoutClick() {
super.onEmptyLayoutClick();
this.topUpBillerPresenter.b();
}
@Override // o.InterfaceC9010dbe.ZKJ
public final void d(C1226Yl c1226Yl) {
e(c1226Yl, true);
}
@Override // o.InterfaceC9010dbe.ZKJ
public final void b() {
C6503cUu c6503cUu = this.topUpBillerPresenter;
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
C16903sI c16903sI = c6503cUu.j;
c6503cUu.d(c16903sI.c((String) null, c16903sI.e(R.string.biller_not_found), ieS));
}
private void e(C1226Yl c1226Yl, boolean z) {
Intent intent = new Intent();
if (z) {
intent.setAction("com.scb.phone/BROADCAST_TOP_UP_FAVOURITE_NEXT_STEP");
} else {
intent.setAction("com.scb.phone/BROADCAST_TOP_UP_NEXT_STEP");
}
intent.putExtra("FRAGMENT_TYPE", 0);
intent.putExtra("com.scb.phone.EXTRA_TOP_DISPLAY", (Parcelable) c1226Yl);
C10457eEr.aqd_(this, intent);
}
public static /* synthetic */ void d(TopUpBillerFragment topUpBillerFragment) {
C6503cUu c6503cUu = topUpBillerFragment.topUpBillerPresenter;
final C1226Yl c = c6503cUu.d.c(c6503cUu.a, c6503cUu.b.a.n());
if (c != null) {
ZI.IeS ieS = new ZI.IeS(c) { // from class: o.cUr
private C1226Yl e;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.ZKJ) obj).d(this.e);
}
{
this.e = c;
}
};
if (c6503cUu.f != 0) {
ieS.e(c6503cUu.f);
return;
}
return;
}
C6508cUz c6508cUz = new C6508cUz();
if (c6503cUu.f != 0) {
c6508cUz.e(c6503cUu.f);
}
}
}