165 lines
5.9 KiB
Java
165 lines
5.9 KiB
Java
package com.scb.phone.view.fragment.investment;
|
|
|
|
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 android.widget.TextView;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.investment.funddetails.InvestmentFundDetailsActivity;
|
|
import com.scb.phone.view.adapter.investment.InvestmentDetailsClientListAdapter;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.investment.MyFundsFragment;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import o.C16148leh;
|
|
import o.C17809ztu;
|
|
import o.C3592bAn;
|
|
import o.C8912dZm;
|
|
import o.InterfaceC13391fZD;
|
|
import o.OK;
|
|
import o.PH;
|
|
import o.cZG;
|
|
import o.fIM;
|
|
import o.fSQ;
|
|
import o.glR;
|
|
import o.ury;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class MyFundsFragment extends Hilt_MyFundsFragment implements cZG.IeS, fIM {
|
|
private C16148leh c;
|
|
private InvestmentDetailsClientListAdapter d;
|
|
|
|
@BindView
|
|
TextView errorTextView;
|
|
private fIM f;
|
|
private RecyclerView.Sts j;
|
|
|
|
@InterfaceC13391fZD
|
|
public C3592bAn myFundsPresenter;
|
|
|
|
@BindView
|
|
RecyclerView recyclerView;
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559735, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.f = this;
|
|
this.myFundsPresenter.e((C3592bAn) this);
|
|
((BaseFragment) this).b = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_INVESTMENT_DETAILS")).subscribe(new fSQ(this) { // from class: o.fgi
|
|
private MyFundsFragment e;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
MyFundsFragment.a(this.e);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
}, new fSQ() { // from class: o.fgk
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
guQ.a((Throwable) obj);
|
|
}
|
|
});
|
|
Parcelable parcelable = bundle != null ? bundle.getParcelable("RecyclerViewExpandableItemManager") : null;
|
|
getContext();
|
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false);
|
|
C8912dZm c8912dZm = new C8912dZm();
|
|
c8912dZm.setSupportsChangeAnimations(false);
|
|
this.c = new C16148leh(parcelable);
|
|
InvestmentDetailsClientListAdapter investmentDetailsClientListAdapter = new InvestmentDetailsClientListAdapter(getContext());
|
|
this.d = investmentDetailsClientListAdapter;
|
|
investmentDetailsClientListAdapter.d = this.f;
|
|
this.j = this.c.d(this.d);
|
|
this.recyclerView.setLayoutManager(linearLayoutManager);
|
|
this.recyclerView.setAdapter(this.j);
|
|
this.recyclerView.setItemAnimator(c8912dZm);
|
|
this.recyclerView.setHasFixedSize(false);
|
|
this.recyclerView.setNestedScrollingEnabled(false);
|
|
this.c.b(this.recyclerView);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onSaveInstanceState(Bundle bundle) {
|
|
super.onSaveInstanceState(bundle);
|
|
C16148leh c16148leh = this.c;
|
|
if (c16148leh != null) {
|
|
bundle.putParcelable("RecyclerViewExpandableItemManager", c16148leh.Oa_());
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroyView() {
|
|
C16148leh c16148leh = this.c;
|
|
if (c16148leh != null) {
|
|
c16148leh.b();
|
|
this.c = null;
|
|
}
|
|
RecyclerView recyclerView = this.recyclerView;
|
|
if (recyclerView != null) {
|
|
recyclerView.setItemAnimator(null);
|
|
this.recyclerView.setAdapter(null);
|
|
this.recyclerView = null;
|
|
}
|
|
RecyclerView.Sts sts = this.j;
|
|
if (sts != null) {
|
|
ury.d(sts);
|
|
this.j = null;
|
|
}
|
|
super.onDestroyView();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
this.myFundsPresenter.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
@Override // o.fIM
|
|
public final void d(int i, String str) {
|
|
Intent intent = new Intent(getContext(), (Class<?>) InvestmentFundDetailsActivity.class);
|
|
intent.putParcelableArrayListExtra("INVESTMENT_DETAILS_CLIENT_LIST", new ArrayList<>(this.myFundsPresenter.c.j));
|
|
C3592bAn c3592bAn = this.myFundsPresenter;
|
|
intent.putExtra("INVESTMENT_DETAILS_CLIENT", c3592bAn.d.get(c3592bAn.a(str)));
|
|
intent.putExtra("SELECTED_FUND_LIST_POSITION", i);
|
|
intent.putExtra("SELECTED_CLIENT_LIST_POSITION", this.myFundsPresenter.a(str));
|
|
intent.putExtra("PROFILE_CUSTOMER_NAME", this.myFundsPresenter.c.i.c);
|
|
startActivity(intent);
|
|
}
|
|
|
|
@Override // o.cZG.IeS
|
|
public final void b(List<PH> list) {
|
|
this.recyclerView.setVisibility(0);
|
|
InvestmentDetailsClientListAdapter investmentDetailsClientListAdapter = this.d;
|
|
investmentDetailsClientListAdapter.c.clear();
|
|
investmentDetailsClientListAdapter.c.addAll(list);
|
|
investmentDetailsClientListAdapter.notifyDataSetChanged();
|
|
}
|
|
|
|
public static /* synthetic */ void a(MyFundsFragment myFundsFragment) {
|
|
C3592bAn c3592bAn = myFundsFragment.myFundsPresenter;
|
|
if (c3592bAn.f != 0) {
|
|
c3592bAn.f.v();
|
|
}
|
|
c3592bAn.e.a();
|
|
C17809ztu c17809ztu = c3592bAn.e;
|
|
c17809ztu.d(c17809ztu.i, new C3592bAn.HBt(c3592bAn, (byte) 0));
|
|
}
|
|
|
|
@Override // o.cZG.IeS
|
|
public final void d(List<OK> list) {
|
|
this.myFundsPresenter.d = list;
|
|
}
|
|
}
|