CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 StoryListActivity$initData$1.java 源代码,内容仅作参考
package org.godfootsteps.home;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import carbon.custom.LoadingLayout;
import carbon.widget.TextView;
import com.bumptech.glide.load.DecodeFormat;
import d.c.a.i.b;
import d.c.a.j.v;
import d.c.f.c0;
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 kotlin.jvm.internal.Lambda;
import n.e;
import n.g.f.a.c;
import n.i.a.a;
import n.i.a.l;
import n.i.a.p;
import n.i.b.h;
import org.commons.screenadapt.recyclerview.FastScreenListAdapter;
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.HomeStoryModel;
import org.godfootsteps.arch.api.util.Request;
import org.godfootsteps.arch.customSystemViews.CustomThumbnailView;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.home.StoryListActivity;
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u0014\u0012\u0004\u0012\u00020\u0003\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\u00040\u0002H\n"}, d2 = {"<anonymous>", "", "Lorg/godfootsteps/arch/api/util/Request;", "Lorg/godfootsteps/arch/api/model/HomeStoryModel;", "Lorg/godfootsteps/arch/api/model/BaseModel;"}, k = 3, mv = {1, 5, 1}, xi = 48)
public final class StoryListActivity$initData$1 extends Lambda implements l<Request<HomeStoryModel, BaseModel<HomeStoryModel>>, e> {
public final StoryListActivity this$0;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001H\u008a@"}, d2 = {"<anonymous>", "Lorg/godfootsteps/arch/api/model/BaseModel;", "Lorg/godfootsteps/arch/api/model/HomeStoryModel;"}, k = 3, mv = {1, 5, 1}, xi = 48)
@c(c = "org.godfootsteps.home.StoryListActivity$initData$1$2", f = "StoryListActivity.kt", l = {253}, m = "invokeSuspend")
public static final class AnonymousClass2 extends SuspendLambda implements l<n.g.c<? super BaseModel<HomeStoryModel>>, Object> {
public int label;
public final StoryListActivity this$0;
public AnonymousClass2(StoryListActivity storyListActivity, n.g.c<? super AnonymousClass2> cVar) {
super(1, cVar);
this.this$0 = storyListActivity;
}
@Override
public final n.g.c<e> create(n.g.c<?> cVar) {
return new AnonymousClass2(this.this$0, cVar);
}
@Override
public final Object invoke(n.g.c<? super BaseModel<HomeStoryModel>> cVar) {
return ((AnonymousClass2) create(cVar)).invokeSuspend(e.a);
}
@Override
public final Object invokeSuspend(Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i2 = this.label;
if (i2 == 0) {
d.Q4(obj);
Objects.requireNonNull(AppClient.a);
AppClient appClient = AppClient.Companion.f15176d;
String valueOf = String.valueOf(((Number) this.this$0.f15865m.getValue()).intValue());
this.label = 1;
obj = appClient.I(valueOf, this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
d.Q4(obj);
}
return obj;
}
}
public StoryListActivity$initData$1(StoryListActivity storyListActivity) {
super(1);
this.this$0 = storyListActivity;
}
@Override
public e invoke(Request<HomeStoryModel, BaseModel<HomeStoryModel>> request) {
invoke2(request);
return e.a;
}
public final void invoke2(Request<HomeStoryModel, BaseModel<HomeStoryModel>> request) {
h.e(request, "$this$request");
final StoryListActivity storyListActivity = this.this$0;
request.f15179k = new a<e>() {
{
super(0);
}
@Override
public e invoke() {
invoke2();
return e.a;
}
public final void invoke2() {
((LoadingLayout) StoryListActivity.this.findViewById(R$id.loading_layout)).k();
}
};
request.f(new AnonymousClass2(this.this$0, null));
final StoryListActivity storyListActivity2 = this.this$0;
request.f15180l = new l<HomeStoryModel, e>() {
{
super(1);
}
@Override
public e invoke(HomeStoryModel homeStoryModel) {
invoke2(homeStoryModel);
return e.a;
}
public final void invoke2(final HomeStoryModel homeStoryModel) {
h.e(homeStoryModel, "model");
StoryListActivity storyListActivity3 = StoryListActivity.this;
storyListActivity3.f15867o = homeStoryModel;
int i2 = R$id.loading_layout;
((LoadingLayout) storyListActivity3.findViewById(i2)).i();
List<HomeStoryModel.ArticleListBean> articleList = homeStoryModel.getArticleList();
boolean z = true;
if (!(articleList == null || articleList.isEmpty())) {
List<HomeStoryModel.ImageListBean> imageList = homeStoryModel.getImageList();
h.d(imageList, "model.imageList");
for (HomeStoryModel.ImageListBean imageListBean : imageList) {
StringBuilder sb = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb.append("https://appservercn.kingdomsalvation.org");
sb.append((Object) homeStoryModel.getImageUrl());
sb.append("/hd/");
sb.append((Object) imageListBean.getPicName());
imageListBean.setPicName(sb.toString());
}
StoryListActivity storyListActivity4 = StoryListActivity.this;
Objects.requireNonNull(storyListActivity4);
if (homeStoryModel.getImageList().size() > 0) {
((TextView) storyListActivity4.findViewById(R$id.tv_image_num)).setText(String.valueOf(homeStoryModel.getImageList().size()));
} else {
TextView textView = (TextView) storyListActivity4.findViewById(R$id.tv_image_num);
h.d(textView, "tv_image_num");
n0.c(textView, false, 1);
}
String str = (String) storyListActivity4.f15864l.getValue();
if (str != null && str.length() != 0) {
z = false;
}
if (!z) {
n.m.t.a.p.m.e1.a.Q2(storyListActivity4).f().d0((String) storyListActivity4.f15864l.getValue()).r(e.c0.a.R() ? R$drawable.ic_placeholder_2_1_night : R$drawable.ic_placeholder_2_1_white).j(DecodeFormat.PREFER_RGB_565).N(new c0(storyListActivity4)).m().M((CustomThumbnailView) storyListActivity4.findViewById(R$id.iv_backdrop));
}
StoryListActivity storyListActivity5 = StoryListActivity.this;
int i3 = R$id.rv_list;
if (((RecyclerView) storyListActivity5.findViewById(i3)).getAdapter() == null) {
List<HomeStoryModel.ArticleListBean> articleList2 = homeStoryModel.getArticleList();
final StoryListActivity storyListActivity6 = StoryListActivity.this;
((RecyclerView) StoryListActivity.this.findViewById(i3)).setAdapter(new FastScreenListAdapter<HomeStoryModel.ArticleListBean>(articleList2) {
@Override
public Integer f() {
if (v.i()) {
return null;
}
return Integer.valueOf(R$layout.item_bible_story_header);
}
@Override
public int g() {
return R$layout.item_number_title;
}
@Override
public void i(ScreenViewHolder screenViewHolder, HomeStoryModel.ArticleListBean articleListBean) {
final HomeStoryModel.ArticleListBean articleListBean2 = articleListBean;
h.e(articleListBean2, "item");
if (screenViewHolder == null) {
return;
}
final HomeStoryModel homeStoryModel2 = homeStoryModel;
final StoryListActivity storyListActivity7 = StoryListActivity.this;
View view = screenViewHolder.f15173i;
View findViewById = view == null ? null : view.findViewById(R$id.tv_number);
h.d(findViewById, "tv_number");
n.m.t.a.p.m.e1.a.q2((android.widget.TextView) findViewById);
View view2 = screenViewHolder.f15173i;
((TextView) (view2 == null ? null : view2.findViewById(R$id.tv_number))).setText(String.valueOf(v.i() ? screenViewHolder.getLayoutPosition() + 1 : screenViewHolder.getLayoutPosition()));
View view3 = screenViewHolder.f15173i;
((android.widget.TextView) (view3 != null ? view3.findViewById(R$id.tv_title) : null)).setText(articleListBean2.getTitle());
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view4) {
HomeStoryModel homeStoryModel3 = HomeStoryModel.this;
HomeStoryModel.ArticleListBean articleListBean3 = articleListBean2;
StoryListActivity storyListActivity8 = storyListActivity7;
n.i.b.h.e(homeStoryModel3, "$model");
n.i.b.h.e(articleListBean3, "$item");
n.i.b.h.e(storyListActivity8, "this$0");
d.c.i.c cVar = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar != null) {
StringBuilder sb2 = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb2.append("https://appservercn.kingdomsalvation.org");
sb2.append((Object) homeStoryModel3.getArticleUrl());
sb2.append((Object) articleListBean3.getArticle());
String sb3 = sb2.toString();
int id = articleListBean3.getId();
String str2 = (String) storyListActivity8.f15863k.getValue();
n.i.b.h.d(str2, "mode");
String share = articleListBean3.getShare();
if (share == null) {
share = "";
}
cVar.k(sb3, id, str2, "", share);
}
GAEventSendUtil.Companion companion = GAEventSendUtil.a;
int i4 = StoryListActivity.f15862u;
companion.l(storyListActivity8.Z(), articleListBean3.getTitle());
}
});
if (v.i()) {
View view4 = screenViewHolder.itemView;
h.d(view4, "itemView");
new b(view4, 0.0f, 0.0f, 6).a();
}
}
@Override
public void j(ScreenViewHolder screenViewHolder) {
h.e(screenViewHolder, "holder");
View view = screenViewHolder.f15173i;
View findViewById = view == null ? null : view.findViewById(R$id.tv_title);
StoryListActivity storyListActivity7 = StoryListActivity.this;
int i4 = StoryListActivity.f15862u;
((android.widget.TextView) findViewById).setText(storyListActivity7.Z());
}
});
return;
}
RecyclerView.Adapter adapter = ((RecyclerView) StoryListActivity.this.findViewById(i3)).getAdapter();
Objects.requireNonNull(adapter, "null cannot be cast to non-null type org.commons.screenadapt.recyclerview.FastScreenListAdapter<org.godfootsteps.arch.api.model.HomeStoryModel.ArticleListBean>");
FastScreenListAdapter fastScreenListAdapter = (FastScreenListAdapter) adapter;
fastScreenListAdapter.a = homeStoryModel.getArticleList();
fastScreenListAdapter.notifyDataSetChanged();
return;
}
LoadingLayout loadingLayout = (LoadingLayout) StoryListActivity.this.findViewById(i2);
h.d(loadingLayout, "loading_layout");
n.m.t.a.p.m.e1.a.v2(loadingLayout);
}
};
final StoryListActivity storyListActivity3 = this.this$0;
request.f15181m = new p<Integer, String, e>() {
{
super(2);
}
@Override
public e invoke(Integer num, String str) {
invoke(num.intValue(), str);
return e.a;
}
public final void invoke(int i2, String str) {
h.e(str, "s");
LoadingLayout loadingLayout = (LoadingLayout) StoryListActivity.this.findViewById(R$id.loading_layout);
h.d(loadingLayout, "loading_layout");
n.m.t.a.p.m.e1.a.v2(loadingLayout);
}
};
}
}