正在查看: MedEd v5.3.6 应用的 NeetPgDescriptionFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 NeetPgDescriptionFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.penpencil.physicswallah.feature.batch.presentation.fragment;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.cardview.widget.CardView;
import androidx.lifecycle.I;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.bumptech.glide.Glide;
import com.google.android.material.button.MaterialButton;
import com.penpencil.network.models.PlayerModel;
import com.penpencil.network.response.BatchData;
import com.penpencil.network.response.DemoVideosResponse;
import com.penpencil.network.response.FAQData;
import com.penpencil.network.response.FAQResponse;
import com.penpencil.network.response.PreferenceData;
import com.penpencil.network.response.Subject;
import com.penpencil.network.response.SuccessResponse;
import com.penpencil.network.response.TeacherIds;
import com.penpencil.physicswallah.dialog.UnenrollBatchDialog;
import com.penpencil.physicswallah.feature.batch.presentation.fragment.NeetPgDescriptionFragment;
import com.penpencil.physicswallah.feature.home.presentation.ui.AppNavigationContainerActivity;
import com.penpencil.player.models.BatchCredential;
import com.penpencil.player.models.CourseCredential;
import defpackage.C0147Oq0;
import defpackage.C0610mP1;
import defpackage.C0812sz;
import defpackage.Qp;
import defpackage.Sr3;
import defpackage.UP2;
import defpackage.Vs;
import defpackage.YF2;
import defpackage.aS1;
import defpackage.l02;
import defpackage.vm2;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import kotlin.jvm.internal.Intrinsics;
public class NeetPgDescriptionFragment extends Qp implements UnenrollBatchDialog.a {
public static final int w = 0;
@BindView
TextView batchNameTv;
@BindView
ImageView batchPosterIv;
@BindView
LinearLayout demoVideosLl;
@BindView
RecyclerView demoVideosRcv;
@BindView
WebView descTv;
@BindView
TextView descriptionTv;
@BindView
TextView endDateTv;
@BindView
LinearLayout faculatiesLL;
@BindView
RecyclerView facultiesRcv;
@BindView
TextView facultiesTxt;
@BindView
RecyclerView faqRcv;
@BindView
TextView faqTv;
public BatchData k;
public C0812sz l;
public l02 m;
public List<FAQData> n;
public ArrayList<TeacherIds> o;
public ArrayList<Subject> p;
@BindView
TextView previewTv;
public UP2 q;
public K80 r;
public Vs s;
@BindView
RecyclerView schedulesRcv;
@BindView
TextView schedulesTxt;
@BindView
TextView startDateTv;
@BindView
CardView supportCv;
public String t;
@BindView
LinearLayout timeSlotLl;
public boolean u;
@BindView
MaterialButton unenrollButton;
@BindView
ImageView unenrollIv;
public boolean v = false;
@BindView
AppCompatImageView videoPreviewIv;
@BindView
RelativeLayout videoPreviewLayout;
@BindView
TextView viewAllFacultiesTv;
@BindView
TextView viewAllSchedulesTv;
public class a extends Sr3 {
public final PlayerModel d;
public a(PlayerModel playerModel) {
this.d = playerModel;
}
@Override
public final vm2 B() {
return vm2.j;
}
@Override
public final String C() {
return "batch_preview";
}
@Override
public final int a() {
return 0;
}
@Override
public final BatchCredential b() {
String e;
BatchData batchData = NeetPgDescriptionFragment.this.k;
if (batchData == null || (e = batchData.get_id()) == null) {
e = UW2.e(QW2.a);
}
String str = e;
QW2 qw2 = QW2.a;
String e2 = UW2.e(qw2);
String e3 = UW2.e(qw2);
String e4 = UW2.e(qw2);
float batchPrice = batchData != null ? batchData.getBatchPrice() : 0.0f;
boolean isPurchased = batchData != null ? batchData.isPurchased() : false;
String name = batchData != null ? batchData.getName() : null;
String e5 = UW2.e(qw2);
String e6 = UW2.e(qw2);
String e7 = UW2.e(qw2);
String e8 = UW2.e(qw2);
tk0 tk0Var = tk0.a;
return new BatchCredential(str, e2, e3, e4, batchPrice, isPurchased, name, e5, e6, e7, e8, (List) tk0Var, (List) tk0Var, batchData, 16384);
}
@Override
public final CourseCredential d() {
return null;
}
@Override
public final PlayerModel i() {
return this.d;
}
}
public static void d1(NeetPgDescriptionFragment neetPgDescriptionFragment) {
neetPgDescriptionFragment.unenrollButton.setVisibility(8);
String string = neetPgDescriptionFragment.getString(2132021036);
String string2 = neetPgDescriptionFragment.getString(2132017499);
UnenrollBatchDialog unenrollBatchDialog = new UnenrollBatchDialog();
Bundle bundle = new Bundle();
bundle.putString("header", string);
bundle.putString("message", string2);
unenrollBatchDialog.setArguments(bundle);
unenrollBatchDialog.setTargetFragment(neetPgDescriptionFragment, 1);
unenrollBatchDialog.show(neetPgDescriptionFragment.j.getSupportFragmentManager(), "unenrollBatch");
}
public static void e1(NeetPgDescriptionFragment neetPgDescriptionFragment, DemoVideosResponse demoVideosResponse) {
neetPgDescriptionFragment.q.a();
Objects.toString(demoVideosResponse);
if (demoVideosResponse == null) {
neetPgDescriptionFragment.demoVideosLl.setVisibility(8);
return;
}
if (!demoVideosResponse.getSuccess()) {
neetPgDescriptionFragment.demoVideosLl.setVisibility(8);
return;
}
if (demoVideosResponse.getData() == null) {
neetPgDescriptionFragment.demoVideosLl.setVisibility(8);
return;
}
if (demoVideosResponse.getData().size() == 0) {
neetPgDescriptionFragment.demoVideosLl.setVisibility(8);
return;
}
K80 k80 = new K80(neetPgDescriptionFragment.requireActivity(), neetPgDescriptionFragment.k, demoVideosResponse.getData());
neetPgDescriptionFragment.r = k80;
neetPgDescriptionFragment.demoVideosRcv.setAdapter(k80);
neetPgDescriptionFragment.r.notifyDataSetChanged();
}
public static void f1(NeetPgDescriptionFragment neetPgDescriptionFragment, FAQResponse fAQResponse) {
neetPgDescriptionFragment.getClass();
if (fAQResponse != null && fAQResponse.getSuccess()) {
if (neetPgDescriptionFragment.l == null) {
neetPgDescriptionFragment.l = new C0812sz(pK0.g(PreferenceData.class, new ArrayList()));
}
neetPgDescriptionFragment.l.d(Long.valueOf(System.currentTimeMillis()));
List<FAQData> data = fAQResponse.getData();
neetPgDescriptionFragment.n = data;
if (data == null) {
neetPgDescriptionFragment.faqTv.setVisibility(8);
neetPgDescriptionFragment.faqRcv.setVisibility(8);
} else if (data.size() == 0) {
neetPgDescriptionFragment.faqTv.setVisibility(8);
neetPgDescriptionFragment.faqRcv.setVisibility(8);
} else {
neetPgDescriptionFragment.faqTv.setVisibility(0);
neetPgDescriptionFragment.faqRcv.setVisibility(0);
RecyclerView recyclerView = neetPgDescriptionFragment.faqRcv;
neetPgDescriptionFragment.requireContext();
recyclerView.setLayoutManager(new LinearLayoutManager(1));
neetPgDescriptionFragment.faqRcv.setAdapter(new C0147Oq0(neetPgDescriptionFragment.requireActivity(), neetPgDescriptionFragment.n));
}
neetPgDescriptionFragment.l.c(pK0.g(FAQData.class, fAQResponse.getData()));
neetPgDescriptionFragment.h.c().H("https://meded-api.penpencil.coep_programId_faq_" + neetPgDescriptionFragment.k.getFaqCat(), pK0.h(C0812sz.class, neetPgDescriptionFragment.l));
}
}
public final void S() {
Vs vs = this.s;
String str = this.t;
Gr a2 = vs.b.a();
a2.getClass();
lH1 lh1 = new lH1();
a2.a.b().batchUnEnroll(str).d(VF2.a()).a(Jc.a()).c(new Cr(lh1));
lh1.f(this, new b02() {
public final void a(Object obj) {
SuccessResponse successResponse = (SuccessResponse) obj;
int i = NeetPgDescriptionFragment.w;
NeetPgDescriptionFragment neetPgDescriptionFragment = NeetPgDescriptionFragment.this;
ProgressDialog progressDialog = neetPgDescriptionFragment.i;
if (progressDialog != null && progressDialog.isShowing()) {
neetPgDescriptionFragment.i.cancel();
}
if (successResponse == null) {
Toast.makeText((Context) neetPgDescriptionFragment.requireActivity(), (CharSequence) neetPgDescriptionFragment.getString(2132018186), 0).show();
return;
}
if (successResponse.getSuccess()) {
Toast.makeText((Context) neetPgDescriptionFragment.requireActivity(), 2132017510, 0).show();
Intent intent = new Intent((Context) neetPgDescriptionFragment.requireActivity(), (Class<?>) AppNavigationContainerActivity.class);
intent.addFlags(67108864);
neetPgDescriptionFragment.startActivity(intent);
neetPgDescriptionFragment.requireActivity().finish();
}
}
});
}
public final void g1() {
PlayerModel C = o11.C(this.k);
C.setVideoName("Watch Orientation Class");
HI1.d(requireActivity(), this.k, new a(C));
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (getArguments() != null) {
this.k = getArguments().getParcelable("batchOverview");
this.u = getArguments().getBoolean("isPurchased");
this.t = getArguments().getString("batchId");
}
}
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(2131558730, viewGroup, false);
ButterKnife.a(inflate, this);
return inflate;
}
public final void onResume() {
super.onResume();
if (this.v) {
PlayerModel C = o11.C(this.k);
this.demoVideosLl.setVisibility(0);
RecyclerView recyclerView = this.demoVideosRcv;
requireContext();
recyclerView.setLayoutManager(new LinearLayoutManager(0));
UP2 up2 = new UP2(this.demoVideosRcv, this.r, 2131558598, 6);
this.q = up2;
up2.b();
Vs vs = this.s;
String str = this.k.get_id();
Gr a2 = vs.b.a();
a2.getClass();
lH1 lh1 = new lH1();
a2.a.b().getDemoVideos(str).d(VF2.a()).a(Jc.a()).c(new Ar(lh1));
lh1.f(getViewLifecycleOwner(), new XK0(this, 1));
if (TextUtils.isEmpty(C.getVideoUrl())) {
this.videoPreviewLayout.setVisibility(8);
} else {
this.videoPreviewLayout.setVisibility(0);
}
this.j.X0(this.k);
this.batchNameTv.setText(this.k.getName());
if (this.k.isPathshalaOrVidyapeethBatch()) {
this.timeSlotLl.setVisibility(8);
} else {
this.startDateTv.setText(getString(2132020649) + " " + W20.c(this.k.getStartDate()));
this.endDateTv.setText(getString(2132018110) + " " + W20.c(this.k.getEndDate()));
}
if (this.k.getPreviewImage() != null && this.k.getPreviewImage().getKey() != null && this.k.getPreviewImage().getBaseUrl() != null) {
this.batchPosterIv.setVisibility(0);
Glide.g(this).r(this.k.getPreviewImage().getBaseUrl() + this.k.getPreviewImage().getKey()).F(this.batchPosterIv);
}
if (TextUtils.isEmpty(this.k.getDescription())) {
this.descriptionTv.setVisibility(8);
this.descTv.setVisibility(8);
} else {
this.descriptionTv.setVisibility(0);
this.descTv.setVisibility(0);
this.descTv.loadDataWithBaseURL(null, this.k.getDescription(), "text/html", "UTF-8", null);
this.descTv.getSettings().setTextSize(WebSettings.TextSize.NORMAL);
this.descTv.setOnTouchListener(new aS1());
}
if (this.k.getSubjects() == null || this.k.getSubjects().isEmpty()) {
this.schedulesTxt.setVisibility(8);
this.facultiesTxt.setVisibility(8);
this.schedulesRcv.setVisibility(8);
this.facultiesRcv.setVisibility(8);
this.faculatiesLL.setVisibility(8);
} else {
this.o = new ArrayList<>();
this.p = new ArrayList<>();
for (Subject subject : this.k.getSubjects()) {
if (subject.getTeacherIds() != null) {
for (TeacherIds teacherIds : subject.getTeacherIds()) {
teacherIds.setSubjectName(subject.getSubject());
this.o.add(teacherIds);
}
}
if (subject.getFileId() != null) {
this.p.add(subject);
}
}
if (this.o.isEmpty()) {
this.faculatiesLL.setVisibility(8);
} else {
C0610mP1 c0610mP1 = this.o.size() > 5 ? new C0610mP1(new ArrayList(this.o.subList(0, 5)), requireContext()) : new C0610mP1(this.o, requireContext());
this.facultiesRcv.setHasFixedSize(true);
this.facultiesRcv.setAdapter(c0610mP1);
}
if (this.p.isEmpty()) {
this.schedulesTxt.setVisibility(8);
this.schedulesRcv.setVisibility(8);
this.viewAllSchedulesTv.setVisibility(8);
} else {
boolean z = getResources().getBoolean(2131034120);
ct3.f(this.viewAllSchedulesTv, (z && this.p.size() >= 8) || (!z && this.p.size() >= 4));
RecyclerView recyclerView2 = this.schedulesRcv;
requireContext();
recyclerView2.setLayoutManager(new LinearLayoutManager(0));
YF2 yf2 = new YF2(this.p, requireContext(), this.t, this.h);
this.schedulesRcv.setAdapter(yf2);
yf2.notifyDataSetChanged();
}
}
if (TextUtils.isEmpty(this.k.getFaqCat())) {
this.faqTv.setVisibility(8);
this.faqRcv.setVisibility(8);
} else {
this.faqTv.setVisibility(8);
this.faqRcv.setVisibility(8);
if (!TextUtils.isEmpty(this.k.getFaqCat())) {
String m = this.h.c().a.m("https://meded-api.penpencil.coep_programId_faq_" + this.k.getFaqCat());
if (!TextUtils.isEmpty(m)) {
C0812sz c0812sz = (C0812sz) pK0.c(C0812sz.class, m);
this.l = c0812sz;
List<FAQData> a3 = pK0.a(FAQData.class, c0812sz.a());
this.n = a3;
if (a3 == null) {
this.faqTv.setVisibility(8);
this.faqRcv.setVisibility(8);
} else if (a3.size() == 0) {
this.faqTv.setVisibility(8);
this.faqRcv.setVisibility(8);
} else {
this.faqTv.setVisibility(0);
this.faqRcv.setVisibility(0);
RecyclerView recyclerView3 = this.faqRcv;
requireContext();
recyclerView3.setLayoutManager(new LinearLayoutManager(1));
this.faqRcv.setAdapter(new C0147Oq0(requireActivity(), this.n));
}
}
l02 l02Var = this.m;
String faqCat = this.k.getFaqCat();
k02 d = l02Var.b.d();
d.getClass();
lH1 lh12 = new lH1();
d.a.b().getFAQs(faqCat, "63b52963e72e8b00186c11f3").d(VF2.a()).a(Jc.a()).c(new i02(lh12));
lh12.f(getViewLifecycleOwner(), new bL0(this, 2));
}
}
this.v = false;
}
}
public final void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
this.v = true;
this.h.c().A();
this.h.c().n();
this.h.c().p();
this.k.getName();
this.t = this.k.get_id();
this.u = this.k.isPurchased();
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore = getViewModelStore();
I.c c = Pt3.c(this);
SW b = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore, "store");
Intrinsics.checkNotNullParameter(c, "factory");
Ot3 b2 = Yd.b(b, "defaultCreationExtras", viewModelStore, c, b);
EG b3 = Y0.b(l02.class, "modelClass", l02.class, "<this>", l02.class);
Intrinsics.checkNotNullParameter(b3, "modelClass");
this.m = (l02) Ot3.b(b2, b3);
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore2 = getViewModelStore();
I.c c2 = Pt3.c(this);
SW b4 = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore2, "store");
Intrinsics.checkNotNullParameter(c2, "factory");
Ot3 b5 = Yd.b(b4, "defaultCreationExtras", viewModelStore2, c2, b4);
EG b6 = Y0.b(Vs.class, "modelClass", Vs.class, "<this>", Vs.class);
Intrinsics.checkNotNullParameter(b6, "modelClass");
this.s = (Vs) Ot3.b(b5, b6);
if (this.k.getOrientationClassBanner() == null) {
Glide.f(getContext()).q(2131231273).F(this.videoPreviewIv);
} else {
Glide.f(getContext()).r(this.k.getOrientationClassBanner().getBaseUrl() + this.k.getOrientationClassBanner().getKey()).F(this.videoPreviewIv);
}
this.previewTv.setText("Watch Orientation Class");
this.videoPreviewLayout.setOnClickListener(new wK0(this, 2));
this.videoPreviewIv.setOnClickListener(new xK0(this, 2));
this.previewTv.setOnClickListener(new Dt1(this, 3));
this.supportCv.setOnClickListener(new yK0(this, 3));
this.viewAllFacultiesTv.setOnClickListener(new YH2(this, 6));
this.viewAllSchedulesTv.setOnClickListener(new y92(this, 3));
if (this.u && this.k.getFee() != null && this.k.getFee().getTotal() == 0.0f) {
this.unenrollIv.setVisibility(0);
}
this.unenrollIv.setOnClickListener(new b(this, 0));
this.unenrollButton.setOnClickListener(new iY2(this, 2));
}
}