what-the-bank/sources/com/scb/phone/view/fragment/help/HelpFragment.java

124 lines
4.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.help;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.PreLoadCheckActivity;
import com.scb.phone.view.activity.contactus.ContactUsActivity;
import com.scb.phone.view.activity.findus.FindUsActivity;
import com.scb.phone.view.adapter.help.HelpAdapter;
import o.C14957gcv;
import o.C8064dAG;
import o.InterfaceC12824fIT;
import o.InterfaceC13391fZD;
import o.InterfaceC6676cZs;
import o.ZI;
import o.ZZ;
import o.gjJ;
import o.guQ;
import o.myN;
/* loaded from: classes5.dex */
public class HelpFragment extends Hilt_HelpFragment implements InterfaceC12824fIT, InterfaceC6676cZs {
@InterfaceC13391fZD
public ZZ helpPresenter;
@BindView
RecyclerView mRecyclerView;
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559685, viewGroup, false);
ButterKnife.c(this, inflate);
this.helpPresenter.e((ZZ) this);
super.aa();
Y();
Z();
u(getString(R.string.help));
getContext();
this.mRecyclerView.setLayoutManager(new LinearLayoutManager(1, false));
this.mRecyclerView.setAdapter(new HelpAdapter(getContext(), this, this.helpPresenter.a(getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null)));
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment
public final void aa() {
super.aa();
Y();
Z();
u(getString(R.string.help));
}
@Override // o.InterfaceC12824fIT
public final void a(int i) {
Intent intent;
final String str;
if (i == 0) {
intent = new Intent(getContext(), (Class<?>) ContactUsActivity.class);
} else if (i != 1) {
intent = null;
if (i == 2) {
v("how_to_use_app_more_option");
ZZ zz = this.helpPresenter;
String W = W();
C14957gcv.e(W, "");
C8064dAG a = zz.c.a.a();
myN myn = a != null ? a.f8679o : null;
if (myn != null) {
if (C14957gcv.b((Object) "th", (Object) W)) {
str = myn.b;
} else {
str = myn.d;
}
if (str != null) {
ZI.IeS ieS = new ZI.IeS(str) { // from class: o.aac
private String a;
@Override // o.ZI.IeS
public final void e(Object obj) {
ZZ.e(this.a, (InterfaceC6676cZs) obj);
}
{
this.a = str;
}
};
if (zz.f != 0) {
ieS.e(zz.f);
}
}
}
}
} else {
intent = new Intent(getContext(), (Class<?>) FindUsActivity.class);
}
if (intent != null) {
startActivity(intent);
}
}
@Override // o.InterfaceC6676cZs
public final void c(String str) {
if (gjJ.d((CharSequence) str)) {
try {
Intent intent = new Intent(CommonConstant.ACTION.HWID_SCHEME_URL);
intent.setData(Uri.parse(str));
startActivity(intent);
} catch (ActivityNotFoundException | NullPointerException e) {
guQ.e(e);
}
}
}
}