正在查看: 漫天星 v3.0.2 应用的 CircleContentDetailActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 漫天星 v3.0.2 应用的 CircleContentDetailActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cn.a.comic.home;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Parcelable;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import cn.a.comic.api.circle.bean.CircleComment;
import cn.a.comic.api.circle.bean.CircleCommentReply;
import cn.a.comic.api.circle.bean.CircleCommentReplyMore;
import cn.a.comic.api.circle.bean.CircleContentBean;
import cn.a.comic.home.adapter.recycler.CircleCommentRvAdapter;
import cn.a.comic.home.dialog.CircleCommentDialog;
import cn.a.lib.widget.recycler.SimpleTypeAdapterV2;
import com.junyue.basic.activity.BaseActivity;
import com.junyue.basic.adapter.LoadMoreCommonRecyclerViewAdapter;
import com.junyue.basic.adapter.LoadMoreViewHolder;
import com.junyue.basic.bean.BaseListBean;
import com.junyue.basic.bean.User;
import com.junyue.basic.widget.BaseRecyclerView;
import com.junyue.basic.widget.CircleImageView;
import com.junyue.basic.widget.CommonLinearLayout;
import com.junyue.basic.widget.CommonTextView;
import com.junyue.basic.widget.PressedImageView;
import com.junyue.basic.widget.StatusLayout;
import com.junyue.novel.modules_index.R;
import e.a.a.b.c.c;
import e.a.a.b.c.e;
import f.p.c.g.d;
import f.p.c.r.c;
import f.p.c.s.b;
import f.p.c.z.a1;
import f.p.c.z.o0;
import f.p.c.z.u0;
import i.b0.c.t;
import i.b0.c.u;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function4;
@f.p.c.r.j({e.a.a.b.c.d.class})
public final class CircleContentDetailActivity extends BaseActivity implements e.a.a.b.c.e, View.OnClickListener {
public final i.d E;
public final i.d F;
public final i.d G;
public final i.d H;
public final i.d I;
public final i.d J;
public final i.d K;
public final i.d L;
public final i.d M;
public final i.d N;
public final i.d O;
public final i.d P;
public final i.d Q;
public final i.d R;
public final i.d S;
public final i.d T;
public final i.d U;
public final i.d V;
public final i.d W;
public final i.d X;
public final i.d Y;
public final i.d Z;
public final i.d e0;
public final i.d f0;
public final i.d g0;
public int h0;
public boolean i0;
public CircleContentBean j0;
public final CircleCommentRvAdapter k0;
public static final class a extends u implements Function1<CircleCommentReply, Boolean> {
public final CircleCommentReply n;
public a(CircleCommentReply circleCommentReply) {
super(1);
this.n = circleCommentReply;
}
public final boolean b(CircleCommentReply circleCommentReply) {
t.d(circleCommentReply, "it");
return circleCommentReply.f() == this.n.f();
}
public Object invoke(Object obj) {
return Boolean.valueOf(b((CircleCommentReply) obj));
}
}
public static final class b extends u implements Function1<CircleCommentReply, Boolean> {
public final CircleCommentReply n;
public b(CircleCommentReply circleCommentReply) {
super(1);
this.n = circleCommentReply;
}
public final boolean b(CircleCommentReply circleCommentReply) {
t.d(circleCommentReply, "it");
return circleCommentReply.f() == this.n.f();
}
public Object invoke(Object obj) {
return Boolean.valueOf(b((CircleCommentReply) obj));
}
}
public static final class c extends u implements Function1<CircleCommentReply, Boolean> {
public final CircleCommentReply n;
public c(CircleCommentReply circleCommentReply) {
super(1);
this.n = circleCommentReply;
}
public final boolean b(CircleCommentReply circleCommentReply) {
t.d(circleCommentReply, "it");
return circleCommentReply.f() == this.n.f();
}
public Object invoke(Object obj) {
return Boolean.valueOf(b((CircleCommentReply) obj));
}
}
public static final class d extends u implements Function1<f.p.c.k.f<Drawable>, f.p.c.k.f<?>> {
public static final d n = new d();
public d() {
super(1);
}
public final f.p.c.k.f<?> invoke(f.p.c.k.f<Drawable> fVar) {
t.e(fVar, "$receiver");
f.p.c.k.f<?> k1 = fVar.R0().S0().k1(R.drawable.ic_default_head_img_blank2);
t.d(k1, "centerCrop().circleCrop(…_default_head_img_blank2)");
return k1;
}
}
public static final class e extends u implements Function1<f.p.c.k.f<Drawable>, f.p.c.k.f<?>> {
public e() {
super(1);
}
public final f.p.c.k.f<?> invoke(f.p.c.k.f<Drawable> fVar) {
t.e(fVar, "$receiver");
return a1.a(fVar, CircleContentDetailActivity.this.getContext());
}
}
public static final class f implements SwipeRefreshLayout.OnRefreshListener {
public f() {
}
@Override
public final void onRefresh() {
CircleContentDetailActivity.this.i0 = true;
CircleContentDetailActivity.this.H0();
}
}
public static final class g implements View.OnClickListener {
public g() {
}
@Override
public final void onClick(View view) {
CircleContentDetailActivity.this.H0();
}
}
public static final class h extends u implements Function1<CircleCommentReplyMore, i.t> {
public h() {
super(1);
}
public final void b(CircleCommentReplyMore circleCommentReplyMore) {
t.e(circleCommentReplyMore, "it");
CircleContentDetailActivity.this.o1().m0(circleCommentReplyMore);
}
public Object invoke(Object obj) {
b((CircleCommentReplyMore) obj);
return i.t.a;
}
}
public static final class i extends u implements Function4<Integer, Integer, String, Boolean, i.t> {
public i() {
super(4);
}
public final void b(int i, int i2, String str, boolean z) {
if (z) {
CircleContentDetailActivity.this.o1().r(i, i2);
} else {
CircleContentDetailActivity.this.o1().s0(i, i2);
}
}
public Object invoke(Object obj, Object obj2, Object obj3, Object obj4) {
b(((Number) obj).intValue(), ((Number) obj2).intValue(), (String) obj3, ((Boolean) obj4).booleanValue());
return i.t.a;
}
}
public static final class j extends u implements Function2<CircleComment, CircleCommentReply, i.t> {
public j() {
super(2);
}
public final void b(CircleComment circleComment, CircleCommentReply circleCommentReply) {
t.e(circleComment, "comment");
if (circleCommentReply == null) {
CircleContentDetailActivity.this.o1().c(circleComment.n());
} else {
CircleContentDetailActivity.this.o1().G(circleCommentReply);
}
}
public Object invoke(Object obj, Object obj2) {
b((CircleComment) obj, (CircleCommentReply) obj2);
return i.t.a;
}
}
public static final class k extends u implements Function1<LoadMoreViewHolder, i.t> {
public k() {
super(1);
}
public final void b(LoadMoreViewHolder loadMoreViewHolder) {
t.e(loadMoreViewHolder, "it");
CircleContentDetailActivity.this.H0();
}
public Object invoke(Object obj) {
b((LoadMoreViewHolder) obj);
return i.t.a;
}
}
public static final class l extends u implements Function2<CircleComment, CircleCommentReply, i.t> {
public static final class a extends u implements Function2<Integer, String, i.t> {
public final CircleCommentDialog n;
public final l o;
public final CircleCommentReply p;
public final CircleComment q;
public static final class C0005a extends u implements Function0<i.t> {
public C0005a() {
super(0);
}
public Object invoke() {
m10invoke();
return i.t.a;
}
public final void m10invoke() {
c.a.b(CircleContentDetailActivity.this, (Object) null, 1, (Object) null);
Context context = a.this.n.getContext();
t.d(context, "context");
u0.l(context, R.string.publish_comment_success, 0, 2, (Object) null);
a.this.n.dismiss();
}
}
public a(CircleCommentDialog circleCommentDialog, String str, l lVar, CircleCommentReply circleCommentReply, CircleComment circleComment) {
super(2);
this.n = circleCommentDialog;
this.o = lVar;
this.p = circleCommentReply;
this.q = circleComment;
}
public final void b(int i, String str) {
t.e(str, "content");
e.a.a.b.c.c o1 = CircleContentDetailActivity.this.o1();
int n = this.q.n();
CircleCommentReply circleCommentReply = this.p;
o1.N(n, circleCommentReply != null ? Integer.valueOf(circleCommentReply.f()) : null, str, new C0005a());
}
public Object invoke(Object obj, Object obj2) {
b(((Number) obj).intValue(), (String) obj2);
return i.t.a;
}
}
public l() {
super(2);
}
public final void b(CircleComment circleComment, CircleCommentReply circleCommentReply) {
t.e(circleComment, "comment");
Context context = CircleContentDetailActivity.this.getContext();
if (!User.k()) {
f.p.c.z.h.b(context, 0, (Function1) null, 3, (Object) null);
return;
}
String g = circleCommentReply != null ? circleCommentReply.g() : circleComment.r();
CircleCommentDialog circleCommentDialog = new CircleCommentDialog(CircleContentDetailActivity.this.getContext(), 0, true, 2, null);
circleCommentDialog.r0("想对" + g + "说点什么呢");
circleCommentDialog.t0(new a(circleCommentDialog, g, this, circleCommentReply, circleComment));
circleCommentDialog.show();
}
public Object invoke(Object obj, Object obj2) {
b((CircleComment) obj, (CircleCommentReply) obj2);
return i.t.a;
}
}
public static final class m extends u implements Function2<CircleComment, CircleCommentReply, i.t> {
public m() {
super(2);
}
public final void b(CircleComment circleComment, CircleCommentReply circleCommentReply) {
if (circleComment != null) {
c.a.a(CircleContentDetailActivity.this.o1(), circleComment.n(), circleComment.d(), false, 4, null);
} else if (circleCommentReply != null) {
c.a.b(CircleContentDetailActivity.this.o1(), circleCommentReply.f(), circleCommentReply.j(), false, 4, null);
}
}
public Object invoke(Object obj, Object obj2) {
b((CircleComment) obj, (CircleCommentReply) obj2);
return i.t.a;
}
}
public static final class n extends u implements Function2<Integer, String, i.t> {
public final CircleCommentDialog n;
public final CircleContentDetailActivity o;
public static final class a extends u implements Function0<i.t> {
public a() {
super(0);
}
public Object invoke() {
m11invoke();
return i.t.a;
}
public final void m11invoke() {
c.a.b(n.this.o, (Object) null, 1, (Object) null);
Context context = n.this.n.getContext();
t.d(context, "context");
u0.l(context, R.string.publish_comment_success, 0, 2, (Object) null);
n.this.n.dismiss();
}
}
public n(CircleCommentDialog circleCommentDialog, String str, CircleContentDetailActivity circleContentDetailActivity) {
super(2);
this.n = circleCommentDialog;
this.o = circleContentDetailActivity;
}
public final void b(int i, String str) {
t.e(str, "content");
this.o.o1().p0(CircleContentDetailActivity.d1(this.o).g(), i, str, new a());
}
public Object invoke(Object obj, Object obj2) {
b(((Number) obj).intValue(), (String) obj2);
return i.t.a;
}
}
public static final class o extends u implements Function0<i.t> {
public final boolean o;
public final int p;
public final int q;
public final int r;
public o(boolean z, int i, int i2, int i3) {
super(0);
this.o = z;
this.p = i;
this.q = i2;
this.r = i3;
}
public Object invoke() {
m12invoke();
return i.t.a;
}
public final void m12invoke() {
if (this.o) {
CircleContentDetailActivity.this.k0.notifyItemRangeChanged(this.p, this.q);
}
CircleContentDetailActivity.this.k0.notifyItemChanged(this.p + this.q);
LoadMoreCommonRecyclerViewAdapter loadMoreCommonRecyclerViewAdapter = CircleContentDetailActivity.this.k0;
int i = this.p;
int i2 = this.q;
loadMoreCommonRecyclerViewAdapter.notifyItemRangeInserted(i + i2, this.r - i2);
}
}
public static final class p implements View.OnClickListener {
public final f.p.c.g.d n;
public final CircleContentDetailActivity o;
public static final class a extends u implements Function0<i.t> {
public a() {
super(0);
}
public Object invoke() {
m13invoke();
return i.t.a;
}
public final void m13invoke() {
f.o.a.b.a().h("delete_circle_page_list", CircleContentDetailActivity.d1(p.this.o));
p.this.n.dismiss();
p.this.o.finish();
}
}
public p(f.p.c.g.d dVar, CircleContentDetailActivity circleContentDetailActivity) {
this.n = dVar;
this.o = circleContentDetailActivity;
}
@Override
public final void onClick(View view) {
this.o.o1().g0(CircleContentDetailActivity.d1(this.o).g(), new a());
}
}
public static final class q extends u implements Function2<View, d.a, i.t> {
public final f.p.c.g.d o;
public static final class a extends u implements Function0<i.t> {
public a() {
super(0);
}
public Object invoke() {
m14invoke();
return i.t.a;
}
public final void m14invoke() {
u0.m(CircleContentDetailActivity.this.getContext(), "举报成功", 0, 2, (Object) null);
}
}
public q(f.p.c.g.d dVar) {
super(2);
this.o = dVar;
}
public final void b(View view, d.a aVar) {
t.e(view, "v");
t.e(aVar, "item");
CircleContentDetailActivity.this.o1().b0(CircleContentDetailActivity.d1(CircleContentDetailActivity.this).g(), aVar.b(), new a());
i.t tVar = i.t.a;
this.o.dismiss();
}
public Object invoke(Object obj, Object obj2) {
b((View) obj, (d.a) obj2);
return i.t.a;
}
}
public CircleContentDetailActivity() {
super(R.layout.activity_circle_content_detail);
this.E = f.n.a.a.a.a(this, R.id.sl);
this.F = f.n.a.a.a.a(this, R.id.iv_avatar);
this.G = f.n.a.a.a.a(this, R.id.tv_nickname);
this.H = f.n.a.a.a.a(this, R.id.tv_content);
this.I = f.n.a.a.a.a(this, R.id.tv_video_name);
this.J = f.n.a.a.a.a(this, R.id.tv_update_count);
this.K = f.n.a.a.a.a(this, R.id.tv_actor);
this.L = f.n.a.a.a.a(this, R.id.tv_time);
this.M = f.n.a.a.a.a(this, R.id.iv_cover);
this.N = f.n.a.a.a.a(this, R.id.tv_count);
this.O = f.n.a.a.a.a(this, R.id.tv_count_1);
this.P = f.n.a.a.a.a(this, R.id.tv_count_2);
this.Q = f.n.a.a.a.a(this, R.id.tv_bookmark);
this.R = f.n.a.a.a.a(this, R.id.tv_score);
this.S = f.n.a.a.a.a(this, R.id.tv_delete);
this.T = f.n.a.a.a.a(this, R.id.iv_multi_menu);
this.U = f.n.a.a.a.a(this, R.id.ll_cartoon_info);
this.V = f.n.a.a.a.a(this, R.id.ll_bookmark);
this.W = f.n.a.a.a.a(this, R.id.tv_comment_content);
this.X = f.n.a.a.a.a(this, R.id.srl);
this.Y = f.n.a.a.a.a(this, R.id.rv_list);
this.Z = f.n.a.a.a.a(this, R.id.cb_like);
this.e0 = f.n.a.a.a.a(this, R.id.cb_like_2);
this.f0 = f.n.a.a.a.a(this, R.id.rv_selected_comic_list);
this.g0 = f.p.c.r.h.b(this, 0, 2, (Object) null);
this.h0 = 1;
this.k0 = new CircleCommentRvAdapter(new m(), this);
}
public static final CircleContentBean d1(CircleContentDetailActivity circleContentDetailActivity) {
CircleContentBean circleContentBean = circleContentDetailActivity.j0;
if (circleContentBean != null) {
return circleContentBean;
}
t.t("mDetail");
throw null;
}
@Override
public void A(CircleCommentReply circleCommentReply) {
t.e(circleCommentReply, "replyBean");
CircleComment circleComment = circleCommentReply.comment;
t.d(circleComment, "replyBean.comment");
circleComment.x(circleComment.u() - 1);
CircleComment circleComment2 = circleCommentReply.comment;
t.d(circleComment2, "replyBean.comment");
CircleCommentReplyMore t = circleComment2.t();
t.d(t, "replyBean.comment.replyMore");
List<CircleCommentReply> b2 = t.b();
if (b2 == null || b2.isEmpty()) {
CircleComment circleComment3 = circleCommentReply.comment;
t.d(circleComment3, "replyBean.comment");
List<CircleCommentReply> list = circleComment3.t().replyListCache;
if (list == null || list.isEmpty()) {
CircleComment circleComment4 = circleCommentReply.comment;
t.d(circleComment4, "replyBean.comment");
List<CircleCommentReply> s = circleComment4.s();
if (s != null) {
s.remove(circleCommentReply);
}
CircleComment circleComment5 = circleCommentReply.comment;
t.d(circleComment5, "replyBean.comment");
List<CircleCommentReply> list2 = circleComment5.t().replyListCache;
if (list2 != null) {
}
CircleComment circleComment6 = circleCommentReply.comment;
t.d(circleComment6, "replyBean.comment");
CircleCommentReplyMore t2 = circleComment6.t();
t.d(t2, "replyBean.comment.replyMore");
List<CircleCommentReply> b3 = t2.b();
if (b3 != null) {
}
this.k0.g0(true);
this.k0.notifyDataSetChanged();
}
}
CircleComment circleComment7 = circleCommentReply.comment;
t.d(circleComment7, "replyBean.comment");
List<CircleCommentReply> s2 = circleComment7.s();
if (s2 != null) {
}
CircleComment circleComment8 = circleCommentReply.comment;
t.d(circleComment8, "replyBean.comment");
List<CircleCommentReply> list3 = circleComment8.t().replyListCache;
if (list3 != null) {
list3.remove(circleCommentReply);
}
CircleComment circleComment9 = circleCommentReply.comment;
t.d(circleComment9, "replyBean.comment");
CircleCommentReplyMore t3 = circleComment9.t();
t.d(t3, "replyBean.comment.replyMore");
List<CircleCommentReply> b4 = t3.b();
if (b4 != null) {
b4.remove(circleCommentReply);
}
this.k0.g0(true);
this.k0.notifyDataSetChanged();
}
public final TextView A1() {
return (TextView) this.G.getValue();
}
public final TextView B1() {
return (TextView) this.R.getValue();
}
public final TextView C1() {
return (TextView) this.L.getValue();
}
public final TextView D1() {
return (TextView) this.K.getValue();
}
public final TextView E1() {
return (TextView) this.I.getValue();
}
public final TextView F1() {
return (TextView) this.J.getValue();
}
@SuppressLint({"SetTextI18n"})
public final void G1() {
Parcelable parcelableExtra = getIntent().getParcelableExtra("extra_circle_content_to_detail");
if (parcelableExtra == null) {
throw new NullPointerException("null cannot be cast to non-null type cn.a.comic.api.circle.bean.CircleContentBean");
}
this.j0 = (CircleContentBean) parcelableExtra;
String stringExtra = getIntent().getStringExtra("extra_circle_content_topic_name");
CircleContentBean circleContentBean = this.j0;
if (circleContentBean == null) {
t.t("mDetail");
throw null;
}
CircleContentBean.MemberBean l2 = circleContentBean.l();
if (l2 != null) {
l2.c();
}
if (I1()) {
l1().setVisibility(8);
z1().setVisibility(0);
} else {
l1().setVisibility(0);
z1().setVisibility(8);
}
CircleImageView j1 = j1();
CircleContentBean.MemberBean l3 = circleContentBean.l();
t.d(l3, "detail.member");
a1.e(j1, l3.b(), false, d.n, 2, (Object) null);
TextView A1 = A1();
CircleContentBean.MemberBean l4 = circleContentBean.l();
t.d(l4, "detail.member");
A1.setText(l4.d());
CommonTextView u1 = u1();
StringBuilder sb = new StringBuilder();
sb.append("回复");
CircleContentBean.MemberBean l5 = circleContentBean.l();
t.d(l5, "detail.member");
sb.append(l5.d());
u1.setText(sb.toString());
v1().setText(circleContentBean.e());
CircleContentBean.CartoonBean b2 = circleContentBean.b();
t.d(b2, "cartoonBean");
if (b2.c() != 0) {
n1().setVisibility(0);
ImageView k1 = k1();
CircleContentBean.CartoonBean b3 = circleContentBean.b();
t.d(b3, "detail.cartoon");
a1.e(k1, b3.f(), false, new e(), 2, (Object) null);
TextView E1 = E1();
CircleContentBean.CartoonBean b4 = circleContentBean.b();
t.d(b4, "detail.cartoon");
E1.setText(b4.e());
TextView F1 = F1();
StringBuilder sb2 = new StringBuilder();
CircleContentBean.CartoonBean b5 = circleContentBean.b();
t.d(b5, "detail.cartoon");
sb2.append(o0.b(b5.d()));
sb2.append(':');
CircleContentBean.CartoonBean b6 = circleContentBean.b();
t.d(b6, "detail.cartoon");
sb2.append(b6.j());
F1.setText(sb2.toString());
TextView D1 = D1();
CircleContentBean.CartoonBean b7 = circleContentBean.b();
t.d(b7, "detail.cartoon");
D1.setText(b7.b());
TextView B1 = B1();
StringBuilder sb3 = new StringBuilder();
CircleContentBean.CartoonBean b8 = circleContentBean.b();
t.d(b8, "detail.cartoon");
sb3.append(b8.g());
sb3.append((char) 20998);
B1.setText(sb3.toString());
} else {
n1().setVisibility(8);
}
n1().setVisibility(8);
SimpleTypeAdapterV2<CircleContentBean.CartoonBean> b9 = e.a.a.b.b.b.a.a.b();
p1().setAdapter(b9);
List<CircleContentBean.CartoonBean> c2 = circleContentBean.c();
t.d(c2, "detail.cartoons");
b9.r(c2);
if (stringExtra == null || stringExtra.length() == 0) {
m1().setVisibility(8);
} else {
m1().setVisibility(0);
t1().setText(stringExtra);
}
C1().setText(f.p.c.z.j.a(circleContentBean.f() * 1000));
g1(circleContentBean.d());
h1().setText(circleContentBean.k() == 0 ? "点赞" : String.valueOf(circleContentBean.k()));
h1().setChecked(circleContentBean.j() == 1);
i1().setText(circleContentBean.k() != 0 ? String.valueOf(circleContentBean.k()) : "点赞");
i1().setChecked(circleContentBean.j() == 1);
}
public void H0() {
int i2 = this.h0;
if (this.i0) {
i2 = 1;
}
e.a.a.b.c.c o1 = o1();
CircleContentBean circleContentBean = this.j0;
if (circleContentBean != null) {
o1.i(circleContentBean.g(), i2, 30);
} else {
t.t("mDetail");
throw null;
}
}
public final void H1() {
y1().setOnClickListener(this);
w1().setOnClickListener(this);
Z0(R.id.iv_multi_menu, this);
Z0(R.id.ll_cartoon_info, this);
Z0(R.id.tv_comment_content, this);
h1().setOnClickListener(this);
i1().setOnClickListener(this);
j1().setOnClickListener(this);
z1().setOnClickListener(this);
}
public final boolean I1() {
CircleContentBean circleContentBean = this.j0;
if (circleContentBean == null) {
t.t("mDetail");
throw null;
}
CircleContentBean.MemberBean l2 = circleContentBean.l();
t.d(l2, "mDetail.member");
int c2 = l2.c();
User c3 = User.c();
return c3 != null && c2 == c3.g();
}
public final void J1() {
this.k0.H().A();
this.k0.g0(true);
this.k0.i();
this.h0 = 1;
r1().A();
H0();
}
public final void K1() {
f.p.c.g.d dVar = new f.p.c.g.d(getContext(), f.p.c.z.h.c(e.a.b.a.a()) ? com.junyue.simple_skin_lib.R.style.AppTheme_Dialog_Night : com.junyue.simple_skin_lib.R.style.AppTheme_Dialog);
d.a aVar = new d.a();
aVar.r("删除");
aVar.n(new p(dVar, this));
dVar.B(aVar);
dVar.show();
}
public final void L1() {
f.p.c.g.d a2 = f.p.n.a.a.a.a.a(getContext());
a2.N(new q(a2));
a2.show();
}
public void O0() {
Y0(R.id.ib_back);
BaseActivity.A0(this, (View) null, 1, (Object) null);
G1();
q1().setAdapter(this.k0);
H1();
f.p.m.b.a(s1(), new f());
r1().setRetryOnClickListener(new g());
this.k0.j0(new h());
this.k0.l0(new i());
this.k0.i0(new j());
this.k0.M(new k());
this.k0.k0(new l());
}
@Override
public void U() {
e.a.f(this);
}
@Override
public void f(boolean z) {
if (z) {
J1();
}
}
@SuppressLint({"SetTextI18n"})
public final void g1(int i2) {
if (i2 == 0) {
x1().setVisibility(8);
y1().setText("评论");
w1().setText("评论");
} else {
x1().setVisibility(0);
x1().setText("全部回复(" + String.valueOf(i2) + (char) 65289);
y1().setText(String.valueOf(i2));
w1().setText(String.valueOf(i2));
}
CircleContentBean circleContentBean = this.j0;
if (circleContentBean == null) {
t.t("mDetail");
throw null;
}
circleContentBean.m(i2);
f.o.a.a a2 = f.o.a.b.a();
CircleContentBean circleContentBean2 = this.j0;
if (circleContentBean2 != null) {
a2.h("refresh_circle_page_list_status", circleContentBean2);
} else {
t.t("mDetail");
throw null;
}
}
public final CheckBox h1() {
return (CheckBox) this.Z.getValue();
}
@Override
@SuppressLint({"NotifyDataSetChanged"})
public void i0(CircleCommentReplyMore circleCommentReplyMore, List<? extends CircleCommentReply> list, boolean z) {
t.e(circleCommentReplyMore, "replyMore");
t.e(list, "list");
int a2 = circleCommentReplyMore.a();
List<CircleCommentReply> b2 = circleCommentReplyMore.b();
boolean z2 = b2 == null || b2.isEmpty();
List<CircleCommentReply> b3 = circleCommentReplyMore.b();
if (b3 == null) {
b3 = new ArrayList<>();
circleCommentReplyMore.d(b3);
}
b3.addAll(list);
if (z) {
circleCommentReplyMore.page = 1;
circleCommentReplyMore.isLoadEnd = true;
} else {
circleCommentReplyMore.page++;
}
circleCommentReplyMore.loading = false;
circleCommentReplyMore.expansioned = true;
this.k0.g0(true);
int i2 = circleCommentReplyMore.firstReplyPosition;
int a3 = circleCommentReplyMore.a();
if (i2 == -1 || a3 <= a2) {
this.k0.notifyDataSetChanged();
} else {
this.k0.f0(new o(z2, i2, a2, a3));
}
}
public final CheckBox i1() {
return (CheckBox) this.e0.getValue();
}
public final CircleImageView j1() {
return (CircleImageView) this.F.getValue();
}
public final ImageView k1() {
return (ImageView) this.M.getValue();
}
public final PressedImageView l1() {
return (PressedImageView) this.T.getValue();
}
public final CommonLinearLayout m1() {
return (CommonLinearLayout) this.V.getValue();
}
public final CommonLinearLayout n1() {
return (CommonLinearLayout) this.U.getValue();
}
public final e.a.a.b.c.c o1() {
return (e.a.a.b.c.c) this.g0.getValue();
}
@Override
public void onClick(View view) {
t.e(view, "v");
int id = view.getId();
if (id == R.id.tv_delete) {
Context context = getContext();
if (User.k()) {
K1();
return;
} else {
f.p.c.z.h.b(context, 0, (Function1) null, 3, (Object) null);
return;
}
}
if (id == R.id.iv_multi_menu) {
Context context2 = getContext();
if (User.k()) {
L1();
return;
} else {
f.p.c.z.h.b(context2, 0, (Function1) null, 3, (Object) null);
return;
}
}
if (id == R.id.ll_cartoon_info) {
f.a.a.a.d.a a2 = f.a.a.a.e.a.c().a("/bookstore/book_detail");
CircleContentBean circleContentBean = this.j0;
if (circleContentBean == null) {
t.t("mDetail");
throw null;
}
t.d(circleContentBean.b(), "mDetail.cartoon");
a2.Q("book_id", r2.c());
a2.B(getContext());
return;
}
if (id == R.id.tv_comment_content || id == R.id.tv_count_2 || id == R.id.tv_count) {
Context context3 = getContext();
if (!User.k()) {
f.p.c.z.h.b(context3, 0, (Function1) null, 3, (Object) null);
return;
}
CircleContentBean circleContentBean2 = this.j0;
if (circleContentBean2 == null) {
t.t("mDetail");
throw null;
}
CircleContentBean.MemberBean l2 = circleContentBean2.l();
t.d(l2, "mDetail.member");
String d2 = l2.d();
Context context4 = getContext();
CircleContentBean circleContentBean3 = this.j0;
if (circleContentBean3 == null) {
t.t("mDetail");
throw null;
}
CircleContentBean.CartoonBean b2 = circleContentBean3.b();
t.d(b2, "mDetail.cartoon");
CircleCommentDialog circleCommentDialog = new CircleCommentDialog(context4, b2.c(), false, 4, null);
circleCommentDialog.r0("想对" + d2 + "说点什么呢");
circleCommentDialog.t0(new n(circleCommentDialog, d2, this));
circleCommentDialog.show();
return;
}
if (id == R.id.cb_like) {
if (User.k()) {
CircleContentBean circleContentBean4 = this.j0;
if (circleContentBean4 == null) {
t.t("mDetail");
throw null;
}
f.p.c.s.b d3 = f.p.c.s.b.d();
t.d(d3, "NetworkMonitor.get()");
b.c e2 = d3.e();
t.d(e2, "NetworkMonitor.get().currentNetwork");
if (e2.h()) {
circleContentBean4.n(h1().isChecked() ? 1 : 2);
h1().setChecked(circleContentBean4.j() == 1);
if (h1().isChecked()) {
circleContentBean4.o(circleContentBean4.k() + 1);
} else {
circleContentBean4.o(i.f0.f.b(circleContentBean4.k() - 1, 0));
}
h1().setText(circleContentBean4.k() != 0 ? String.valueOf(circleContentBean4.k()) : "点赞");
c.a.c(o1(), circleContentBean4.g(), circleContentBean4.j(), false, 4, null);
} else {
h1().setChecked(circleContentBean4.j() == 1);
u0.l(getContext(), R.string.request_network_default_error_msg, 0, 2, (Object) null);
}
} else {
h1().setChecked(false);
f.p.c.z.h.b(getContext(), 0, (Function1) null, 3, (Object) null);
}
i1().setChecked(h1().isChecked());
i1().setText(h1().getText());
f.o.a.a a3 = f.o.a.b.a();
CircleContentBean circleContentBean5 = this.j0;
if (circleContentBean5 != null) {
a3.h("refresh_circle_page_list_status", circleContentBean5);
return;
} else {
t.t("mDetail");
throw null;
}
}
if (id == R.id.cb_like_2) {
if (User.k()) {
CircleContentBean circleContentBean6 = this.j0;
if (circleContentBean6 == null) {
t.t("mDetail");
throw null;
}
f.p.c.s.b d4 = f.p.c.s.b.d();
t.d(d4, "NetworkMonitor.get()");
b.c e3 = d4.e();
t.d(e3, "NetworkMonitor.get().currentNetwork");
if (e3.h()) {
circleContentBean6.n(i1().isChecked() ? 1 : 2);
i1().setChecked(circleContentBean6.j() == 1);
if (i1().isChecked()) {
circleContentBean6.o(circleContentBean6.k() + 1);
} else {
circleContentBean6.o(i.f0.f.b(circleContentBean6.k() - 1, 0));
}
i1().setText(circleContentBean6.k() != 0 ? String.valueOf(circleContentBean6.k()) : "点赞");
c.a.c(o1(), circleContentBean6.g(), circleContentBean6.j(), false, 4, null);
} else {
i1().setChecked(circleContentBean6.j() == 1);
u0.l(getContext(), R.string.request_network_default_error_msg, 0, 2, (Object) null);
}
} else {
i1().setChecked(false);
f.p.c.z.h.b(getContext(), 0, (Function1) null, 3, (Object) null);
}
h1().setChecked(i1().isChecked());
h1().setText(i1().getText());
f.o.a.a a4 = f.o.a.b.a();
CircleContentBean circleContentBean7 = this.j0;
if (circleContentBean7 != null) {
a4.h("refresh_circle_page_list_status", circleContentBean7);
} else {
t.t("mDetail");
throw null;
}
}
}
public final BaseRecyclerView p1() {
return (BaseRecyclerView) this.f0.getValue();
}
@Override
@SuppressLint({"NotifyDataSetChanged"})
public void q(CircleCommentReplyMore circleCommentReplyMore) {
t.e(circleCommentReplyMore, "replyMore");
circleCommentReplyMore.loading = false;
this.k0.notifyDataSetChanged();
}
public final BaseRecyclerView q1() {
return (BaseRecyclerView) this.Y.getValue();
}
@Override
public void r(boolean z, BaseListBean<CircleComment> baseListBean) {
if (z && baseListBean != null) {
r1().B();
List<? extends CircleComment> b2 = baseListBean.b();
g1(baseListBean.d());
if (this.i0) {
this.h0 = 1;
CircleCommentRvAdapter circleCommentRvAdapter = this.k0;
t.d(b2, "list");
circleCommentRvAdapter.D(b2);
this.i0 = false;
} else {
CircleCommentRvAdapter circleCommentRvAdapter2 = this.k0;
t.d(b2, "list");
circleCommentRvAdapter2.V(b2);
}
if (this.k0.s()) {
r1().s();
} else if (baseListBean.e()) {
this.k0.H().x();
} else {
this.h0++;
this.k0.H().w();
}
} else if (this.k0.s()) {
r1().t();
} else {
this.k0.H().y();
}
s1().setRefreshing(false);
}
public final StatusLayout r1() {
return (StatusLayout) this.E.getValue();
}
public final SwipeRefreshLayout s1() {
return (SwipeRefreshLayout) this.X.getValue();
}
public final TextView t1() {
return (TextView) this.Q.getValue();
}
public final CommonTextView u1() {
return (CommonTextView) this.W.getValue();
}
public final TextView v1() {
return (TextView) this.H.getValue();
}
public final TextView w1() {
return (TextView) this.N.getValue();
}
public final TextView x1() {
return (TextView) this.O.getValue();
}
public final TextView y1() {
return (TextView) this.P.getValue();
}
public final TextView z1() {
return (TextView) this.S.getValue();
}
}