CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 HtmlArticleActivity$loadRecommend$2.java 源代码,内容仅作参考
package org.godfootsteps.book;
import android.view.View;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import i.c.a.c.n0;
import i.j.a.e.t.d;
import java.util.List;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import n.e;
import n.f.g;
import n.g.f.a.c;
import n.i.a.p;
import n.i.b.h;
import n.m.t.a.p.m.e1.a;
import o.b.a0;
import o.b.b0;
import o.b.e0;
import o.b.y;
import org.commons.screenadapt.recyclerview.ScreenListAdapter;
import org.commons.screenadapt.recyclerview.ScreenViewHolder;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.BaseModel;
import org.godfootsteps.arch.api.model.RecommArticleModel;
import org.godfootsteps.arch.customSystemViews.CustomThumbnailView;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.book.HtmlArticleActivity;
import u.w;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 5, 1}, xi = 48)
@c(c = "org.godfootsteps.book.HtmlArticleActivity$loadRecommend$2", f = "HtmlArticleActivity.kt", l = {388}, m = "invokeSuspend")
public final class HtmlArticleActivity$loadRecommend$2 extends SuspendLambda implements p<y, n.g.c<? super e>, Object> {
private Object L$0;
public int label;
public final HtmlArticleActivity this$0;
public HtmlArticleActivity$loadRecommend$2(HtmlArticleActivity htmlArticleActivity, n.g.c<? super HtmlArticleActivity$loadRecommend$2> cVar) {
super(2, cVar);
this.this$0 = htmlArticleActivity;
}
@Override
public final n.g.c<e> create(Object obj, n.g.c<?> cVar) {
HtmlArticleActivity$loadRecommend$2 htmlArticleActivity$loadRecommend$2 = new HtmlArticleActivity$loadRecommend$2(this.this$0, cVar);
htmlArticleActivity$loadRecommend$2.L$0 = obj;
return htmlArticleActivity$loadRecommend$2;
}
@Override
public final Object invoke(y yVar, n.g.c<? super e> cVar) {
return ((HtmlArticleActivity$loadRecommend$2) create(yVar, cVar)).invokeSuspend(e.a);
}
@Override
public final Object invokeSuspend(Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i2 = this.label;
boolean z = false;
if (i2 == 0) {
d.Q4(obj);
y yVar = (y) this.L$0;
if (((Number) this.this$0.f15674n.getValue()).intValue() != -1) {
a0 o2 = a.o(yVar, e0.b, null, new HtmlArticleActivity$loadRecommend$2$recommendDef$1(this.this$0, null), 2, null);
this.label = 1;
obj = ((b0) o2).A(this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else {
TextView textView = (TextView) this.this$0.findViewById(R$id.tv_recommend);
h.d(textView, "tv_recommend");
n0.c(textView, false, 1);
RecyclerView recyclerView = (RecyclerView) this.this$0.findViewById(R$id.rv_recommend);
h.d(recyclerView, "rv_recommend");
n0.c(recyclerView, false, 1);
return e.a;
}
} else if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
d.Q4(obj);
}
w wVar = (w) obj;
final HtmlArticleActivity htmlArticleActivity = this.this$0;
HtmlArticleActivity.a aVar = HtmlArticleActivity.z;
Objects.requireNonNull(htmlArticleActivity);
BaseModel baseModel = (BaseModel) wVar.b;
final RecommArticleModel recommArticleModel = baseModel != null ? (RecommArticleModel) baseModel.getResult() : null;
if (wVar.a.f16523k == 200 && recommArticleModel != null) {
List<RecommArticleModel.ArticleListBean> articleList = recommArticleModel.getArticleList();
if (!(articleList == null || articleList.isEmpty())) {
int i3 = R$id.tv_recommend;
TextView textView2 = (TextView) htmlArticleActivity.findViewById(i3);
h.d(textView2, "tv_recommend");
n0.t(textView2);
int i4 = R$id.rv_recommend;
RecyclerView recyclerView2 = (RecyclerView) htmlArticleActivity.findViewById(i4);
h.d(recyclerView2, "rv_recommend");
n0.t(recyclerView2);
((TextView) htmlArticleActivity.findViewById(i3)).setText(recommArticleModel.getTitle());
List<RecommArticleModel.ArticleListBean> articleList2 = recommArticleModel.getArticleList();
h.c(articleList2);
String image = ((RecommArticleModel.ArticleListBean) g.o(articleList2)).getImage();
final boolean z2 = !((image == null || image.length() == 0) ? true : true);
List<RecommArticleModel.ArticleListBean> articleList3 = recommArticleModel.getArticleList();
h.c(articleList3);
final List W = g.W(articleList3, 4);
((RecyclerView) htmlArticleActivity.findViewById(i4)).setAdapter(new ScreenListAdapter<RecommArticleModel.ArticleListBean>(z2, recommArticleModel, htmlArticleActivity, W) {
public final boolean f15684k;
public final RecommArticleModel f15685l;
public final HtmlArticleActivity f15686m;
{
super(null, 1);
if (W != null) {
m(W);
}
}
@Override
public int h() {
return this.f15684k ? R$layout.item_thumbnail_title : R$layout.item_number_title;
}
@Override
public void i(ScreenViewHolder screenViewHolder, RecommArticleModel.ArticleListBean articleListBean) {
final RecommArticleModel.ArticleListBean articleListBean2 = articleListBean;
h.e(articleListBean2, "item");
h.c(screenViewHolder);
boolean z3 = this.f15684k;
final RecommArticleModel recommArticleModel2 = this.f15685l;
final HtmlArticleActivity htmlArticleActivity2 = this.f15686m;
if (z3) {
View view = screenViewHolder.f15173i;
View findViewById = view == null ? null : view.findViewById(R$id.iv_thumbnail);
h.d(findViewById, "iv_thumbnail");
StringBuilder sb = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb.append("https://appservercn.kingdomsalvation.org");
sb.append((Object) recommArticleModel2.getImageUrl());
sb.append("ld/");
sb.append((Object) articleListBean2.getImage());
((CustomThumbnailView) findViewById).e(sb.toString(), R$drawable.ic_placeholder_16_9, (r14 & 4) != 0 ? -1 : 0, (r14 & 8) != 0 ? -1 : 0, (r14 & 16) != 0 ? false : true);
View view2 = screenViewHolder.f15173i;
((TextView) (view2 == null ? null : view2.findViewById(R$id.tv_title))).setMaxLines(Integer.MAX_VALUE);
} else {
View view3 = screenViewHolder.f15173i;
((carbon.widget.TextView) (view3 == null ? null : view3.findViewById(R$id.tv_number))).setText(String.valueOf(screenViewHolder.getLayoutPosition() + 1));
View view4 = screenViewHolder.f15173i;
((TextView) (view4 == null ? null : view4.findViewById(R$id.tv_title))).setMaxLines(2);
}
View view5 = screenViewHolder.f15173i;
((TextView) (view5 != null ? view5.findViewById(R$id.tv_title) : null)).setText(articleListBean2.getTitle());
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view6) {
RecommArticleModel.ArticleListBean articleListBean3 = RecommArticleModel.ArticleListBean.this;
RecommArticleModel recommArticleModel3 = recommArticleModel2;
HtmlArticleActivity htmlArticleActivity3 = htmlArticleActivity2;
n.i.b.h.e(articleListBean3, "$item");
n.i.b.h.e(htmlArticleActivity3, "this$0");
String bookId = articleListBean3.getBookId();
n.i.b.h.c(bookId);
String obj2 = n.o.a.M(bookId).toString();
boolean z4 = false;
if (!(obj2 == null || obj2.length() == 0)) {
String chapterId = articleListBean3.getChapterId();
n.i.b.h.c(chapterId);
String obj3 = n.o.a.M(chapterId).toString();
if (!((obj3 == null || obj3.length() == 0) ? true : true)) {
HtmlArticleActivity.a aVar2 = HtmlArticleActivity.z;
String bookId2 = articleListBean3.getBookId();
n.i.b.h.c(bookId2);
String chapterId2 = articleListBean3.getChapterId();
n.i.b.h.c(chapterId2);
aVar2.a(bookId2, chapterId2, "");
GAEventSendUtil.a.m();
}
}
HtmlArticleActivity.a aVar3 = HtmlArticleActivity.z;
StringBuilder sb2 = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb2.append("https://appservercn.kingdomsalvation.org");
sb2.append((Object) recommArticleModel3.getHtmlUrl());
sb2.append((Object) articleListBean3.getArticle());
String sb3 = sb2.toString();
int id = articleListBean3.getId();
String str = (String) htmlArticleActivity3.f15675o.getValue();
n.i.b.h.d(str, "mode");
HtmlArticleActivity.a.b(aVar3, sb3, id, str, (String) htmlArticleActivity3.f15677q.getValue(), articleListBean3.getShare(), false, false, 96);
GAEventSendUtil.a.m();
}
});
}
});
return e.a;
}
}
TextView textView3 = (TextView) htmlArticleActivity.findViewById(R$id.tv_recommend);
h.d(textView3, "tv_recommend");
n0.c(textView3, false, 1);
RecyclerView recyclerView3 = (RecyclerView) htmlArticleActivity.findViewById(R$id.rv_recommend);
h.d(recyclerView3, "rv_recommend");
n0.c(recyclerView3, false, 1);
return e.a;
}
}