CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 NumberTitleVH.java 源代码,内容仅作参考
package org.godfootsteps.home.viewholder;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import carbon.widget.TextView;
import d.c.a.j.v;
import i.c.a.c.n0;
import i.c.a.c.w;
import i.c.a.c.y;
import java.util.Objects;
import kotlin.Metadata;
import n.f.g;
import n.i.b.h;
import n.m.t.a.p.m.e1.a;
import org.commons.screenadapt.recyclerview.FastScreenListAdapter;
import org.commons.screenadapt.recyclerview.ScreenViewHolder;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.BaseCategoryModel;
import org.godfootsteps.arch.api.model.BaseItemModel;
import org.godfootsteps.arch.api.model.HomeClassicModel;
import org.godfootsteps.arch.api.model.HomeNormalModel;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.arch.view.MyRecyclerView;
import org.godfootsteps.home.GospelQAListActivity;
import org.godfootsteps.home.NewsListActivity;
import org.godfootsteps.home.R$dimen;
import org.godfootsteps.home.R$id;
import org.godfootsteps.home.R$layout;
import org.godfootsteps.home.TrickListActivity;
import org.godfootsteps.home.viewholder.NumberTitleVH;
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0011\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\u0002\n\u0002\b\u0003\b\u0016\u0018\u0000 #2\u00020\u0001:\u0002#$B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010!\u001a\u00020\"2\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018H\u0016R\u001a\u0010\u0005\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u001a\u0010\u000b\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\f\u0010\b\"\u0004\b\r\u0010\nR\u000e\u0010\u000e\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\u000f\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0010\u0010\b\"\u0004\b\u0011\u0010\nR\u000e\u0010\u0012\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\u0014\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0015\u0010\b\"\u0004\b\u0016\u0010\nR\u001c\u0010\u0017\u001a\u0004\u0018\u00010\u0018X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0019\u0010\u001a\"\u0004\b\u001b\u0010\u001cR\u000e\u0010\u001d\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\u001e\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001f\u0010\b\"\u0004\b \u0010\n¨\u0006%"}, d2 = {"Lorg/godfootsteps/home/viewholder/NumberTitleVH;", "Lorg/godfootsteps/home/viewholder/BaseHomeViewHolder;", "itemView", "Landroid/view/View;", "(Landroid/view/View;)V", "article", "", "getArticle", "()Ljava/lang/String;", "setArticle", "(Ljava/lang/String;)V", "bookCover", "getBookCover", "setBookCover", "bookId", "bookUrl", "getBookUrl", "setBookUrl", "category", "categoryTitle", "cssUrl", "getCssUrl", "setCssUrl", "model", "Lorg/godfootsteps/arch/api/model/BaseCategoryModel;", "getModel", "()Lorg/godfootsteps/arch/api/model/BaseCategoryModel;", "setModel", "(Lorg/godfootsteps/arch/api/model/BaseCategoryModel;)V", "tag", "trickUrl", "getTrickUrl", "setTrickUrl", "onBind", "", "Companion", "NumberTitleAdapter", "home_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public class NumberTitleVH extends BaseHomeViewHolder {
public static final int f15901q = 0;
public String f15902k;
public String f15903l;
public String f15904m;
public String f15905n;
public String f15906o;
public BaseCategoryModel f15907p;
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0003J\b\u0010\t\u001a\u00020\nH\u0014J\u001a\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u000e2\u0006\u0010\u000f\u001a\u00020\u0002H\u0014J\u0018\u0010\u0010\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\nH\u0016R\u001a\u0010\u0004\u001a\u00020\u0005X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0004\u0010\u0006\"\u0004\b\u0007\u0010\b¨\u0006\u0014"}, d2 = {"Lorg/godfootsteps/home/viewholder/NumberTitleVH$NumberTitleAdapter;", "Lorg/commons/screenadapt/recyclerview/FastScreenListAdapter;", "Lorg/godfootsteps/arch/api/model/BaseItemModel;", "(Lorg/godfootsteps/home/viewholder/NumberTitleVH;)V", "isGospelQuiz", "", "()Z", "setGospelQuiz", "(Z)V", "getLayoutId", "", "onBind", "", "holder", "Lorg/commons/screenadapt/recyclerview/ScreenViewHolder;", "item", "onCreateViewHolder", "parent", "Landroid/view/ViewGroup;", "viewType", "home_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class NumberTitleAdapter extends FastScreenListAdapter<BaseItemModel> {
public boolean b;
public final NumberTitleVH c;
public NumberTitleAdapter(NumberTitleVH numberTitleVH) {
super(null, 1);
h.e(numberTitleVH, "this$0");
this.c = numberTitleVH;
}
@Override
public int g() {
return R$layout.item_number_title;
}
@Override
public void i(ScreenViewHolder screenViewHolder, BaseItemModel baseItemModel) {
final BaseItemModel baseItemModel2 = baseItemModel;
h.e(baseItemModel2, "item");
if (screenViewHolder == null) {
return;
}
final NumberTitleVH numberTitleVH = this.c;
View view = screenViewHolder.f15173i;
((TextView) (view == null ? null : view.findViewById(R$id.tv_number))).setText(String.valueOf(screenViewHolder.getLayoutPosition() + 1));
View view2 = screenViewHolder.f15173i;
View findViewById = view2 == null ? null : view2.findViewById(R$id.tv_number);
h.d(findViewById, "tv_number");
a.q2((android.widget.TextView) findViewById);
if (baseItemModel2 instanceof HomeClassicModel.ListBean) {
View view3 = screenViewHolder.f15173i;
((android.widget.TextView) (view3 == null ? null : view3.findViewById(R$id.tv_title))).setText(((HomeClassicModel.ListBean) baseItemModel2).getTitle());
View view4 = screenViewHolder.f15173i;
((android.widget.TextView) (view4 != null ? view4.findViewById(R$id.tv_title) : null)).setMaxLines(2);
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view5) {
String str;
BaseItemModel baseItemModel3 = BaseItemModel.this;
NumberTitleVH numberTitleVH2 = numberTitleVH;
n.i.b.h.e(baseItemModel3, "$item");
n.i.b.h.e(numberTitleVH2, "this$0");
HomeClassicModel.ListBean listBean = (HomeClassicModel.ListBean) baseItemModel3;
if (listBean.getChapterId() != null) {
BaseCategoryModel baseCategoryModel = numberTitleVH2.f15907p;
if (baseCategoryModel instanceof HomeClassicModel) {
Objects.requireNonNull(baseCategoryModel, "null cannot be cast to non-null type org.godfootsteps.arch.api.model.HomeClassicModel");
str = ((HomeClassicModel) baseCategoryModel).getBookName();
}
str = "";
d.c.i.c cVar = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar != null) {
String str2 = numberTitleVH2.f15905n;
String chapterId = listBean.getChapterId();
n.i.b.h.d(chapterId, "item.chapterId");
String title = listBean.getTitle();
n.i.b.h.d(title, "item.title");
cVar.i(str2, chapterId, str, title);
}
}
GAEventSendUtil.a.j(listBean.getTitle());
}
});
} else if (baseItemModel2 instanceof HomeNormalModel.ListBean) {
View view5 = screenViewHolder.f15173i;
((android.widget.TextView) (view5 == null ? null : view5.findViewById(R$id.tv_title))).setText(((HomeNormalModel.ListBean) baseItemModel2).getTitle());
View view6 = screenViewHolder.f15173i;
android.widget.TextView textView = (android.widget.TextView) (view6 == null ? null : view6.findViewById(R$id.tv_title));
Integer num = Integer.MAX_VALUE;
num.intValue();
Integer num2 = this.b ? num : null;
textView.setMaxLines(num2 != null ? num2.intValue() : 2);
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view7) {
String j2;
NumberTitleVH numberTitleVH2 = NumberTitleVH.this;
BaseItemModel baseItemModel3 = baseItemModel2;
n.i.b.h.e(numberTitleVH2, "this$0");
n.i.b.h.e(baseItemModel3, "$item");
if (n.i.b.h.a(numberTitleVH2.f15876j, "news")) {
d.c.i.c cVar = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar != null) {
HomeNormalModel.ListBean listBean = (HomeNormalModel.ListBean) baseItemModel3;
cVar.m(listBean.getId(), listBean.getShare());
}
} else {
HomeNormalModel.ListBean listBean2 = (HomeNormalModel.ListBean) baseItemModel3;
String bookId = listBean2.getBookId();
boolean z = false;
if (!(bookId == null || bookId.length() == 0)) {
String chapterId = listBean2.getChapterId();
if (!((chapterId == null || chapterId.length() == 0) ? true : true)) {
d.c.i.c cVar2 = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar2 != null) {
cVar2.e(listBean2.getBookId(), listBean2.getChapterId(), listBean2.getShare());
}
}
}
if (n.i.b.h.a(numberTitleVH2.f15876j, "listen")) {
j2 = n.i.b.h.j(numberTitleVH2.f15903l, listBean2.getName());
} else {
j2 = n.i.b.h.j(numberTitleVH2.f15904m, listBean2.getName());
}
d.c.i.c cVar3 = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar3 != null) {
Objects.requireNonNull(AppClient.a);
cVar3.k(n.i.b.h.j("https://appservercn.kingdomsalvation.org", j2), listBean2.getId(), numberTitleVH2.f15876j, "", listBean2.getShare());
}
}
GAEventSendUtil.a.l(numberTitleVH2.f15906o, ((HomeNormalModel.ListBean) baseItemModel3).getTitle());
}
});
}
}
@Override
public ScreenViewHolder onCreateViewHolder(ViewGroup viewGroup, int i2) {
h.e(viewGroup, "parent");
ScreenViewHolder onCreateViewHolder = super.onCreateViewHolder(viewGroup, i2);
if (v.i() && h.a(this.c.f15876j, "news")) {
View view = onCreateViewHolder.itemView;
i.a.b.a.a.b0(view, "vh.itemView", 12.0f, view);
} else {
View view2 = onCreateViewHolder.itemView;
h.d(view2, "vh.itemView");
n0.q(view2, (int) w.c().getResources().getDimension(R$dimen.dp16_48_x));
}
return onCreateViewHolder;
}
}
public NumberTitleVH(View view) {
super(view);
h.e(view, "itemView");
this.f15902k = "";
this.f15903l = "";
this.f15904m = "";
this.f15905n = "";
this.f15906o = "";
}
@Override
public void b(final BaseCategoryModel baseCategoryModel) {
if (v.i()) {
View view = this.f15173i;
View findViewById = view == null ? null : view.findViewById(R$id.rv_list);
h.d(findViewById, "rv_list");
n0.q(findViewById, !h.a(this.f15876j, "news") ? 0 : y.E(36.0f));
}
View view2 = this.f15173i;
View findViewById2 = view2 == null ? null : view2.findViewById(R$id.rv_list);
h.d(findViewById2, "rv_list");
n0.s(findViewById2, y.E(8.0f));
this.f15907p = baseCategoryModel;
View view3 = this.f15173i;
((MyRecyclerView) (view3 == null ? null : view3.findViewById(R$id.rv_list))).setAdapter(new NumberTitleAdapter(this));
if (baseCategoryModel != null) {
baseCategoryModel.getCategory();
}
if (baseCategoryModel instanceof HomeNormalModel) {
((HomeNormalModel) baseCategoryModel).getTag();
}
if (baseCategoryModel == null) {
return;
}
if (baseCategoryModel instanceof HomeClassicModel) {
HomeClassicModel homeClassicModel = (HomeClassicModel) baseCategoryModel;
String bookId = homeClassicModel.getBookId();
h.d(bookId, "bookId");
this.f15905n = bookId;
View view4 = this.f15173i;
((android.widget.TextView) (view4 == null ? null : view4.findViewById(R$id.tv_mode_title))).setText(homeClassicModel.getTitle());
String title = homeClassicModel.getTitle();
h.d(title, "title");
this.f15906o = title;
View view5 = this.f15173i;
RecyclerView.Adapter adapter = ((MyRecyclerView) (view5 == null ? null : view5.findViewById(R$id.rv_list))).getAdapter();
Objects.requireNonNull(adapter, "null cannot be cast to non-null type org.godfootsteps.home.viewholder.NumberTitleVH.NumberTitleAdapter");
NumberTitleAdapter numberTitleAdapter = (NumberTitleAdapter) adapter;
numberTitleAdapter.b = false;
numberTitleAdapter.a = homeClassicModel.getList();
numberTitleAdapter.notifyDataSetChanged();
} else if (baseCategoryModel instanceof HomeNormalModel) {
View view6 = this.f15173i;
HomeNormalModel homeNormalModel = (HomeNormalModel) baseCategoryModel;
((android.widget.TextView) (view6 == null ? null : view6.findViewById(R$id.tv_mode_title))).setText(homeNormalModel.getTitle());
this.f15906o = homeNormalModel.getTitle();
int i2 = 2;
if (h.a(this.f15876j, "news") && v.i()) {
View view7 = this.f15173i;
RecyclerView.n layoutManager = ((MyRecyclerView) (view7 == null ? null : view7.findViewById(R$id.rv_list))).getLayoutManager();
Objects.requireNonNull(layoutManager, "null cannot be cast to non-null type androidx.recyclerview.widget.GridLayoutManager");
((GridLayoutManager) layoutManager).s(2);
}
View view8 = this.f15173i;
RecyclerView.Adapter adapter2 = ((MyRecyclerView) (view8 == null ? null : view8.findViewById(R$id.rv_list))).getAdapter();
Objects.requireNonNull(adapter2, "null cannot be cast to non-null type org.godfootsteps.home.viewholder.NumberTitleVH.NumberTitleAdapter");
NumberTitleAdapter numberTitleAdapter2 = (NumberTitleAdapter) adapter2;
boolean a = h.a("Gospel-quiz", homeNormalModel.getCategory());
numberTitleAdapter2.b = a;
if (!a) {
i2 = (h.a("Tricks", homeNormalModel.getCategory()) || v.i()) ? 6 : 4;
}
numberTitleAdapter2.a = g.W(homeNormalModel.getList(), i2);
numberTitleAdapter2.notifyDataSetChanged();
}
View view9 = this.f15173i;
e.c0.a.d(view9 != null ? view9.findViewById(R$id.tv_read_more) : null, 500L, new View.OnClickListener() {
@Override
public final void onClick(View view10) {
BaseCategoryModel baseCategoryModel2 = BaseCategoryModel.this;
NumberTitleVH numberTitleVH = this;
BaseCategoryModel baseCategoryModel3 = baseCategoryModel;
int i3 = NumberTitleVH.f15901q;
n.i.b.h.e(baseCategoryModel2, "$this_apply");
n.i.b.h.e(numberTitleVH, "this$0");
if (n.i.b.h.a("Gospel-quiz", baseCategoryModel2.getCategory())) {
Bundle bundle = new Bundle();
View view11 = numberTitleVH.f15173i;
bundle.putString("title", ((android.widget.TextView) (view11 != null ? view11.findViewById(R$id.tv_mode_title) : null)).getText().toString());
e.c0.a.j0(bundle, GospelQAListActivity.class);
} else if (n.i.b.h.a("Tricks", baseCategoryModel2.getCategory())) {
View view12 = numberTitleVH.f15173i;
String obj = ((android.widget.TextView) (view12 != null ? view12.findViewById(R$id.tv_mode_title) : null)).getText().toString();
String str = numberTitleVH.f15876j;
n.i.b.h.e(obj, "title");
n.i.b.h.e(str, "mode");
Bundle bundle2 = new Bundle();
bundle2.putString("title", obj);
bundle2.putString("mode", str);
e.c0.a.j0(bundle2, TrickListActivity.class);
} else if (n.i.b.h.a(numberTitleVH.f15876j, "news")) {
View view13 = numberTitleVH.f15173i;
String obj2 = ((android.widget.TextView) (view13 != null ? view13.findViewById(R$id.tv_mode_title) : null)).getText().toString();
String type = baseCategoryModel2.getType();
n.i.b.h.d(type, "type");
NewsListActivity.c0(obj2, type);
} else {
Objects.requireNonNull(baseCategoryModel3, "null cannot be cast to non-null type org.godfootsteps.arch.api.model.HomeClassicModel");
HomeClassicModel homeClassicModel2 = (HomeClassicModel) baseCategoryModel3;
d.c.i.c cVar = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar != null) {
String cover = homeClassicModel2.getCover();
n.i.b.h.d(cover, "model.cover");
String str2 = numberTitleVH.f15905n;
String summary = homeClassicModel2.getSummary();
if (summary == null) {
summary = "";
}
String bookName = homeClassicModel2.getBookName();
if (bookName == null) {
bookName = homeClassicModel2.getTitle();
}
n.i.b.h.d(bookName, "model.bookName ?: model.title");
String bookCategory = homeClassicModel2.getBookCategory();
cVar.q(cover, str2, summary, bookName, bookCategory == null ? "" : bookCategory, numberTitleVH.f15902k);
}
}
GAEventSendUtil.a.n(numberTitleVH.f15906o);
}
});
}
}