138 lines
4.9 KiB
Java
138 lines
4.9 KiB
Java
|
package com.scb.phone.view.fragment.accountsummary;
|
||
|
|
||
|
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 android.widget.RelativeLayout;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.loan.SmeLoanDetailActivity;
|
||
|
import com.scb.phone.view.fragment.BaseFragment;
|
||
|
import com.scb.phone.view.fragment.accountsummary.SmeLoanFragment;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.C0390Fm;
|
||
|
import o.C12086era;
|
||
|
import o.C2452aeq;
|
||
|
import o.InterfaceC12826fIa;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC6627cYe;
|
||
|
import o.fSQ;
|
||
|
import o.glR;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class SmeLoanFragment extends Hilt_SmeLoanFragment implements InterfaceC6627cYe.vUG, InterfaceC12826fIa {
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C2452aeq smeLoanPresenter;
|
||
|
|
||
|
@BindView
|
||
|
TextView smeLoanTextView;
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559441, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
this.smeLoanPresenter.e((C2452aeq) this);
|
||
|
this.smeLoanTextView.setText(R.string.account_summary_sme_loan);
|
||
|
this.smeLoanPresenter.d();
|
||
|
((BaseFragment) this).b = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_SWIPE_REFRESH")).subscribe(new fSQ(this) { // from class: o.eGr
|
||
|
private SmeLoanFragment b;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
this.b.smeLoanPresenter.d();
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.eGt
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
((BaseCardFragment) this).d = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_HOME_ACTIVITY_REFRESH")).subscribe(new fSQ(this) { // from class: o.eGu
|
||
|
private SmeLoanFragment d;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
this.d.smeLoanPresenter.d();
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.eGt
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
((BaseCardFragment) this).j = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_REGISTERED_ACCOUNTS_UPDATED")).subscribe(new fSQ(this) { // from class: o.eGs
|
||
|
private SmeLoanFragment d;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
this.d.smeLoanPresenter.d();
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
}, new fSQ() { // from class: o.eGt
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
guQ.a((Throwable) obj);
|
||
|
}
|
||
|
});
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.accountsummary.BaseCardFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
C2452aeq c2452aeq = this.smeLoanPresenter;
|
||
|
if (c2452aeq != null) {
|
||
|
c2452aeq.w_();
|
||
|
}
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6627cYe.vUG
|
||
|
public final void d(List<C0390Fm> list) {
|
||
|
if (list.isEmpty()) {
|
||
|
RelativeLayout relativeLayout = this.mParentLayout;
|
||
|
if (relativeLayout != null) {
|
||
|
relativeLayout.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
C12086era c12086era = new C12086era(getActivity(), list);
|
||
|
if (c12086era.c == null) {
|
||
|
c12086era.c = this;
|
||
|
}
|
||
|
this.mViewPager.setAdapter(c12086era);
|
||
|
this.mViewPager.setClipToPadding(false);
|
||
|
this.mViewPager.setPadding(getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0, getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0);
|
||
|
b(list);
|
||
|
RelativeLayout relativeLayout2 = this.mParentLayout;
|
||
|
if (relativeLayout2 != null) {
|
||
|
relativeLayout2.setVisibility(0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC12826fIa
|
||
|
public final void a(int i) {
|
||
|
Intent intent = new Intent(getContext(), (Class<?>) SmeLoanDetailActivity.class);
|
||
|
List<C0390Fm> list = this.smeLoanPresenter.c;
|
||
|
startActivity(intent.putParcelableArrayListExtra("com.scb.phone.EXTRA_SME_LOAN_LIST", list != null ? (ArrayList) list : new ArrayList<>()).putExtra("com.scb.phone.EXTRA_SME_LOAN_SELECTED_POSITION", i));
|
||
|
}
|
||
|
}
|