CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 NewsArticleActivity.java 源代码,内容仅作参考
package org.godfootsteps.book;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import cn.like.nightmodel.NightModelManager;
import d.c.a.j.v;
import d.c.a.j.z;
import e.c0.a;
import h.a.a.g.b;
import h.a.a.g.d;
import i.c.a.c.n0;
import java.util.List;
import java.util.Objects;
import kotlin.Metadata;
import n.e;
import n.g.c;
import n.i.a.l;
import n.i.b.h;
import o.b.a0;
import o.b.e0;
import o.b.y;
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.HomeNormalModel;
import org.godfootsteps.arch.api.model.NewsReadData;
import org.godfootsteps.arch.customSystemViews.CustomThumbnailView;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.book.NewsArticleActivity;
@d
@b
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0007\u0018\u0000 \u000f2\u00020\u0001:\u0001\u000fB\u0005¢\u0006\u0002\u0010\u0002J\u000e\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004H\u0014J\b\u0010\u0006\u001a\u00020\u0007H\u0014J\u0019\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\nH\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u000bJ\u0010\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u0005H\u0014\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0010"}, d2 = {"Lorg/godfootsteps/book/NewsArticleActivity;", "Lorg/godfootsteps/book/HtmlArticleActivity;", "()V", "getHtmlDefAsync", "Lkotlinx/coroutines/Deferred;", "", "initView", "", "loadRecommend", "coroutineScope", "Lkotlinx/coroutines/CoroutineScope;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "processHtml", "", "html", "Companion", "book_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class NewsArticleActivity extends HtmlArticleActivity {
public static final void j0(int i2, String str) {
Bundle bundle = new Bundle();
bundle.putInt("id", i2);
bundle.putString("share", str);
a.j0(bundle, NewsArticleActivity.class);
}
@Override
public void W() {
super.W();
NightModelManager nightModelManager = NightModelManager.a;
NightModelManager.b(this, new l<Boolean, e>() {
{
super(1);
}
@Override
public e invoke(Boolean bool) {
invoke(bool.booleanValue());
return e.a;
}
public final void invoke(boolean z) {
RecyclerView recyclerView;
RecyclerView.Adapter adapter;
NewsArticleActivity newsArticleActivity = NewsArticleActivity.this;
int i2 = R$id.rv_recommend;
RecyclerView recyclerView2 = (RecyclerView) newsArticleActivity.findViewById(i2);
h.d(recyclerView2, "rv_recommend");
if (!n0.h(recyclerView2) || (recyclerView = (RecyclerView) NewsArticleActivity.this.findViewById(i2)) == null || (adapter = recyclerView.getAdapter()) == null) {
return;
}
adapter.notifyDataSetChanged();
}
});
}
@Override
public a0<Object> d0() {
return n.m.t.a.p.m.e1.a.o(this, e0.b, null, new NewsArticleActivity$getHtmlDefAsync$1(this, null), 2, null);
}
@Override
public Object g0(y yVar, c<? super e> cVar) {
return e.a;
}
@Override
public String h0(Object obj) {
h.e(obj, "html");
if (obj instanceof BaseModel) {
BaseModel baseModel = (BaseModel) obj;
if (baseModel.getStatus() == 1 && (baseModel.getResult() instanceof NewsReadData)) {
Object result = baseModel.getResult();
Objects.requireNonNull(result, "null cannot be cast to non-null type org.godfootsteps.arch.api.model.NewsReadData");
final NewsReadData newsReadData = (NewsReadData) result;
List<HomeNormalModel.ListBean> recommList = newsReadData.getRecommList();
if (!(recommList == null || recommList.isEmpty())) {
List<HomeNormalModel.ListBean> recommList2 = newsReadData.getRecommList();
h.c(recommList2);
final boolean z = !TextUtils.isEmpty(recommList2.get(0).getImage());
int i2 = R$id.tv_recommend;
TextView textView = (TextView) findViewById(i2);
h.c(textView);
textView.setText(newsReadData.getTitle());
TextView textView2 = (TextView) findViewById(i2);
h.d(textView2, "tv_recommend");
n0.t(textView2);
int i3 = R$id.rv_recommend;
RecyclerView recyclerView = (RecyclerView) findViewById(i3);
h.d(recyclerView, "rv_recommend");
n0.t(recyclerView);
if (v.i()) {
((RecyclerView) findViewById(i3)).setLayoutManager(new GridLayoutManager(this, 2));
}
final List<HomeNormalModel.ListBean> recommList3 = newsReadData.getRecommList();
((RecyclerView) findViewById(i3)).setAdapter(new FastScreenListAdapter<HomeNormalModel.ListBean>(recommList3) {
@Override
public int g() {
return z ? R$layout.item_thumbnail_title_date_lr : R$layout.item_number_title;
}
@Override
public void i(ScreenViewHolder screenViewHolder, HomeNormalModel.ListBean listBean) {
final HomeNormalModel.ListBean listBean2 = listBean;
h.e(listBean2, "item");
if (screenViewHolder == null) {
return;
}
boolean z2 = z;
NewsReadData newsReadData2 = newsReadData;
NewsArticleActivity newsArticleActivity = this;
TextView textView3 = (TextView) screenViewHolder.itemView.findViewById(R$id.tv_title);
textView3.setText(listBean2.getTitle());
if (!z2) {
textView3.setMaxLines(2);
}
if (z2) {
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) newsReadData2.getImageBaseUrl());
sb.append("ld/");
sb.append(listBean2.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_publish_date))).setText(z.b(listBean2.getDate()));
if (a.R()) {
textView3.setTextColor(-6710887);
View view3 = screenViewHolder.f15173i;
((TextView) (view3 != null ? view3.findViewById(R$id.tv_publish_date) : null)).setTextColor(e.i.b.a.b(newsArticleActivity, R$color.text3));
} else {
textView3.setTextColor(-13421773);
View view4 = screenViewHolder.f15173i;
((TextView) (view4 != null ? view4.findViewById(R$id.tv_publish_date) : null)).setTextColor(-1728053248);
}
} else {
View view5 = screenViewHolder.f15173i;
((carbon.widget.TextView) (view5 != null ? view5.findViewById(R$id.tv_number) : null)).setText(String.valueOf(screenViewHolder.getLayoutPosition() + 1));
if (a.R()) {
textView3.setTextColor(-6710887);
} else {
textView3.setTextColor(-13421773);
}
}
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view6) {
HomeNormalModel.ListBean listBean3 = HomeNormalModel.ListBean.this;
n.i.b.h.e(listBean3, "$item");
NewsArticleActivity.j0(listBean3.getId(), listBean3.getShare());
GAEventSendUtil.a.m();
}
});
}
});
} else {
TextView textView3 = (TextView) findViewById(R$id.tv_recommend);
h.d(textView3, "tv_recommend");
n0.c(textView3, false, 1);
RecyclerView recyclerView2 = (RecyclerView) findViewById(R$id.rv_recommend);
h.d(recyclerView2, "rv_recommend");
n0.c(recyclerView2, false, 1);
}
NewsReadData.PostBean post = newsReadData.getPost();
h.c(post);
String content = post.getContent();
h.c(content);
return content;
}
return "404";
}
return "404";
}
}