what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/TransferFavouriteTargetFrag...

122 lines
4.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
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.TransferFavouriteTargetFragment;
import java.util.List;
import o.AbstractC1181Xh;
import o.C6247cNZ;
import o.InterfaceC12824fIT;
import o.InterfaceC13391fZD;
import o.fSQ;
import o.glR;
/* loaded from: classes5.dex */
public class TransferFavouriteTargetFragment extends Hilt_TransferFavouriteTargetFragment implements InterfaceC12824fIT, View.OnClickListener {
@InterfaceC13391fZD
public C6247cNZ transferFavouriteTargetPresenter;
@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.transferFavouriteTargetPresenter.e((C6247cNZ) this);
((BaseFragment) this).b = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_HOME_ACTIVITY_REFRESH")).subscribe(new fSQ(this) { // from class: o.fEc
private TransferFavouriteTargetFragment c;
@Override // o.fSQ
public final void c(Object obj) {
this.c.transferFavouriteTargetPresenter.d();
}
{
this.c = this;
}
}, new fSQ() { // from class: o.fEh
@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.fEd
private TransferFavouriteTargetFragment c;
@Override // o.fSQ
public final void c(Object obj) {
TransferFavouriteTargetFragment.axV_(this.c, (Intent) obj);
}
{
this.c = this;
}
}, new fSQ() { // from class: o.fEh
@Override // o.fSQ
public final void c(Object obj) {
guQ.a((Throwable) obj);
}
});
((FavouriteTargetFragment) this).d = this;
((FavouriteTargetFragment) this).c = this;
this.transferFavouriteTargetPresenter.d();
a(getString(R.string.favorite_empty));
g();
return inflate;
}
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.transferFavouriteTargetPresenter.w_();
super.onDestroy();
}
@Override // o.InterfaceC12824fIT
public final void a(int i) {
this.transferFavouriteTargetPresenter.c("TRANSFER", 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(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_transfer_empty));
intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "TRANSFER");
startActivity(intent);
}
@Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment
public void onErrorViewClicked() {
super.onErrorViewClicked();
this.transferFavouriteTargetPresenter.d();
}
public static /* synthetic */ void axV_(TransferFavouriteTargetFragment transferFavouriteTargetFragment, Intent intent) {
if ("TRANSFER".equals(intent.getStringExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE"))) {
transferFavouriteTargetFragment.transferFavouriteTargetPresenter.d();
}
}
}