CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 TrickListActivity$initData$1.java 源代码,内容仅作参考
package org.godfootsteps.home;
import android.view.View;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import carbon.custom.LoadingLayout;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import d.c.a.i.b;
import d.c.a.j.v;
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.TrickResult;
import org.godfootsteps.arch.api.util.Request;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.home.TrickListActivity;
@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/TrickResult;", "Lorg/godfootsteps/arch/api/model/BaseModel;"}, k = 3, mv = {1, 5, 1}, xi = 48)
public final class TrickListActivity$initData$1 extends Lambda implements l<Request<TrickResult, BaseModel<TrickResult>>, e> {
public final TrickListActivity 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/TrickResult;"}, k = 3, mv = {1, 5, 1}, xi = 48)
@c(c = "org.godfootsteps.home.TrickListActivity$initData$1$2", f = "TrickListActivity.kt", l = {60}, m = "invokeSuspend")
public static final class AnonymousClass2 extends SuspendLambda implements l<n.g.c<? super BaseModel<TrickResult>>, Object> {
public int label;
public AnonymousClass2(n.g.c<? super AnonymousClass2> cVar) {
super(1, cVar);
}
@Override
public final n.g.c<e> create(n.g.c<?> cVar) {
return new AnonymousClass2(cVar);
}
@Override
public final Object invoke(n.g.c<? super BaseModel<TrickResult>> 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;
this.label = 1;
obj = appClient.N(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 TrickListActivity$initData$1(TrickListActivity trickListActivity) {
super(1);
this.this$0 = trickListActivity;
}
@Override
public e invoke(Request<TrickResult, BaseModel<TrickResult>> request) {
invoke2(request);
return e.a;
}
public final void invoke2(Request<TrickResult, BaseModel<TrickResult>> request) {
h.e(request, "$this$request");
final TrickListActivity trickListActivity = this.this$0;
request.f15179k = new a<e>() {
{
super(0);
}
@Override
public e invoke() {
invoke2();
return e.a;
}
public final void invoke2() {
((LoadingLayout) TrickListActivity.this.findViewById(R$id.loading_layout)).k();
}
};
request.f(new AnonymousClass2(null));
final TrickListActivity trickListActivity2 = this.this$0;
request.f15180l = new l<TrickResult, e>() {
{
super(1);
}
@Override
public e invoke(TrickResult trickResult) {
invoke2(trickResult);
return e.a;
}
public final void invoke2(final TrickResult trickResult) {
h.e(trickResult, "trickResult");
((LoadingLayout) TrickListActivity.this.findViewById(R$id.loading_layout)).i();
TrickListActivity trickListActivity3 = TrickListActivity.this;
int i2 = R$id.rv_list;
if (((RecyclerView) trickListActivity3.findViewById(i2)).getAdapter() == null) {
List<TrickResult.TrickListBean> list = trickResult.getList();
final TrickListActivity trickListActivity4 = TrickListActivity.this;
((RecyclerView) TrickListActivity.this.findViewById(i2)).setAdapter(new FastScreenListAdapter<TrickResult.TrickListBean>(list) {
@Override
public int g() {
return R$layout.item_number_title;
}
@Override
public void i(ScreenViewHolder screenViewHolder, TrickResult.TrickListBean trickListBean) {
final TrickResult.TrickListBean trickListBean2 = trickListBean;
h.e(trickListBean2, "item");
if (screenViewHolder == null) {
return;
}
final TrickResult trickResult2 = TrickResult.this;
final TrickListActivity trickListActivity5 = trickListActivity4;
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((TextView) findViewById);
if (v.i()) {
View view2 = screenViewHolder.itemView;
h.d(view2, "itemView");
new b(view2, 0.0f, 0.0f, 6).a();
}
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 ? view4.findViewById(R$id.tv_title) : null)).setText(trickListBean2.getTitle());
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view5) {
TrickResult.TrickListBean trickListBean3 = TrickResult.TrickListBean.this;
TrickResult trickResult3 = trickResult2;
TrickListActivity trickListActivity6 = trickListActivity5;
n.i.b.h.e(trickListBean3, "$item");
n.i.b.h.e(trickResult3, "$trickResult");
n.i.b.h.e(trickListActivity6, "this$0");
String bookId = trickListBean3.getBookId();
boolean z = false;
if (!(bookId == null || bookId.length() == 0)) {
String chapterId = trickListBean3.getChapterId();
if (!((chapterId == null || chapterId.length() == 0) ? true : true)) {
d.c.i.c cVar = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar != null) {
String bookId2 = trickListBean3.getBookId();
n.i.b.h.d(bookId2, "item.bookId");
String chapterId2 = trickListBean3.getChapterId();
n.i.b.h.d(chapterId2, "item.chapterId");
cVar.e(bookId2, chapterId2, trickListBean3.getShare());
}
GAEventSendUtil.a.l(trickListActivity6.f15874k, trickListBean3.getTitle());
}
}
d.c.i.c cVar2 = (d.c.i.c) k.a.a.a.a.b(d.c.i.c.class);
if (cVar2 != null) {
StringBuilder sb = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb.append("https://appservercn.kingdomsalvation.org");
sb.append((Object) trickResult3.getTrickUrl());
sb.append((Object) trickListBean3.getName());
String sb2 = sb.toString();
int id = trickListBean3.getId();
String str = (String) trickListActivity6.f15875l.getValue();
if (str == null) {
str = "";
}
cVar2.k(sb2, id, str, "", trickListBean3.getShare());
}
GAEventSendUtil.a.l(trickListActivity6.f15874k, trickListBean3.getTitle());
}
});
}
});
} else {
RecyclerView.Adapter adapter = ((RecyclerView) TrickListActivity.this.findViewById(i2)).getAdapter();
Objects.requireNonNull(adapter, "null cannot be cast to non-null type org.commons.screenadapt.recyclerview.FastScreenListAdapter<org.godfootsteps.arch.api.model.TrickResult.TrickListBean>");
FastScreenListAdapter fastScreenListAdapter = (FastScreenListAdapter) adapter;
fastScreenListAdapter.a = trickResult.getList();
fastScreenListAdapter.notifyDataSetChanged();
}
((SmartRefreshLayout) TrickListActivity.this.findViewById(R$id.refresh_layout)).k();
}
};
final TrickListActivity trickListActivity3 = 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) TrickListActivity.this.findViewById(R$id.loading_layout);
h.d(loadingLayout, "loading_layout");
n.m.t.a.p.m.e1.a.v2(loadingLayout);
}
};
}
}