122 lines
4.8 KiB
Java
122 lines
4.8 KiB
Java
|
package com.scb.phone.view.fragment.transferandpay;
|
||
|
|
||
|
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.transferandpay.BillPaymentFavouriteTargetFragment;
|
||
|
import java.util.List;
|
||
|
import o.AbstractC1181Xh;
|
||
|
import o.C6227cMk;
|
||
|
import o.InterfaceC12824fIT;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.fSQ;
|
||
|
import o.glR;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class BillPaymentFavouriteTargetFragment extends Hilt_BillPaymentFavouriteTargetFragment implements InterfaceC12824fIT, View.OnClickListener {
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C6227cMk billPaymentFavouriteTargetPresenter;
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559651, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
this.billPaymentFavouriteTargetPresenter.e((C6227cMk) this);
|
||
|
((BaseFragment) this).b = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_HOME_ACTIVITY_REFRESH")).subscribe(new fSQ(this) { // from class: o.fCT
|
||
|
private BillPaymentFavouriteTargetFragment c;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
this.c.billPaymentFavouriteTargetPresenter.a();
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.fCW
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
this.h = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_EDIT_FAVORITE_REFRESH")).subscribe(new fSQ(this) { // from class: o.fCV
|
||
|
private BillPaymentFavouriteTargetFragment e;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
BillPaymentFavouriteTargetFragment.axI_(this.e, (Intent) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.fCW
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
((FavouriteTargetFragment) this).d = this;
|
||
|
((FavouriteTargetFragment) this).c = this;
|
||
|
this.billPaymentFavouriteTargetPresenter.a();
|
||
|
a(getString(R.string.favorite_empty));
|
||
|
e(C6227cMk.c("BILLPAYMENT"));
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
this.billPaymentFavouriteTargetPresenter.w_();
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC12824fIT
|
||
|
public final void a(int i) {
|
||
|
this.billPaymentFavouriteTargetPresenter.c("BILLPAYMENT", 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);
|
||
|
u(String.format(getString(R.string.favorite), Integer.valueOf(list.size())));
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, o.InterfaceC9010dbe.Heg
|
||
|
public final void e() {
|
||
|
super.e();
|
||
|
a(getString(R.string.favorite_empty));
|
||
|
}
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public 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_bill_payment_empty));
|
||
|
intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "BILLPAYMENT");
|
||
|
startActivity(intent);
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment
|
||
|
public void onErrorViewClicked() {
|
||
|
super.onErrorViewClicked();
|
||
|
this.billPaymentFavouriteTargetPresenter.a();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void axI_(BillPaymentFavouriteTargetFragment billPaymentFavouriteTargetFragment, Intent intent) {
|
||
|
if ("BILLPAYMENT".equals(intent.getStringExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE"))) {
|
||
|
billPaymentFavouriteTargetFragment.billPaymentFavouriteTargetPresenter.a();
|
||
|
}
|
||
|
}
|
||
|
}
|