正在查看: Uptodown App Store v6.80 应用的 RepliesActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 RepliesActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import M1.C0469y;
import N1.k;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.Spanned;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import b2.C0563l;
import c2.C0611v0;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.uptodown.UptodownApp;
import com.uptodown.activities.F;
import com.uptodown.activities.RepliesActivity;
import com.uptodown.activities.preferences.a;
import com.uptodown.util.views.UsernameTextView;
import f2.InterfaceC0910A;
import g2.C0947H;
import g2.L;
import g2.S;
import java.util.ArrayList;
import u2.H;
import u2.p;
public final class RepliesActivity extends AbstractC0740a {
private C0469y L;
private final R2.g J = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
C0611v0 t3;
t3 = RepliesActivity.t3(RepliesActivity.this);
return t3;
}
});
private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(F.class), new i(this), new h(this), new j(null, this));
private final g M = new g();
static final class a extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class C0181a implements r3.f {
final RepliesActivity a;
C0181a(RepliesActivity repliesActivity) {
this.a = repliesActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (h instanceof H.a) {
if (this.a.L == null) {
this.a.u3().d.setVisibility(0);
}
} else if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((F.a) cVar.a()).a()) {
C0469y c0469y = this.a.L;
if (c0469y != null) {
c0469y.a(((F.a) cVar.a()).b());
}
} else if (((F.a) cVar.a()).b().isEmpty()) {
this.a.u3().o.setVisibility(0);
this.a.u3().l.setVisibility(8);
} else {
RepliesActivity repliesActivity = this.a;
ArrayList b = ((F.a) cVar.a()).b();
Context applicationContext = this.a.getApplicationContext();
kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
repliesActivity.L = new C0469y(b, applicationContext, this.a.M);
this.a.u3().l.setAdapter(this.a.L);
}
this.a.u3().f.setVisibility(0);
this.a.u3().d.setVisibility(8);
C0469y c0469y2 = this.a.L;
if (c0469y2 != null) {
c0469y2.b(false);
}
} else {
if (!(h instanceof H.b)) {
throw new R2.k();
}
C0469y c0469y3 = this.a.L;
if (c0469y3 != null) {
c0469y3.b(false);
}
}
return R2.s.a;
}
}
a(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return RepliesActivity.this.new a(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c = W2.b.c();
int i = this.a;
if (i == 0) {
R2.n.b(obj);
r3.I j = RepliesActivity.this.w3().j();
C0181a c0181a = new C0181a(RepliesActivity.this);
this.a = 1;
if (j.collect(c0181a, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
}
throw new R2.d();
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((a) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final RepliesActivity a;
a(RepliesActivity repliesActivity) {
this.a = repliesActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((L.c) cVar.a()).b() == 1) {
this.a.u3().g.p.setText(String.valueOf(((L.c) cVar.a()).a().g()));
} else {
?? r22 = this.a;
String string = r22.getString(2131952006);
kotlin.jvm.internal.m.d(string, "getString(...)");
r22.r0(string);
}
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
b(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return RepliesActivity.this.new b(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c = W2.b.c();
int i = this.a;
if (i == 0) {
R2.n.b(obj);
r3.I l = RepliesActivity.this.w3().l();
a aVar = new a(RepliesActivity.this);
this.a = 1;
if (l.collect(aVar, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
}
throw new R2.d();
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((b) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class c extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final RepliesActivity a;
a(RepliesActivity repliesActivity) {
this.a = repliesActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((F.b) cVar.a()).a() == 1) {
C0469y c0469y = this.a.L;
if (c0469y != null) {
c0469y.c(((F.b) cVar.a()).b());
}
} else {
?? r22 = this.a;
String string = r22.getString(2131952006);
kotlin.jvm.internal.m.d(string, "getString(...)");
r22.r0(string);
}
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
c(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return RepliesActivity.this.new c(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c = W2.b.c();
int i = this.a;
if (i == 0) {
R2.n.b(obj);
r3.I k = RepliesActivity.this.w3().k();
a aVar = new a(RepliesActivity.this);
this.a = 1;
if (k.collect(aVar, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
}
throw new R2.d();
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((c) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class d extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final RepliesActivity a;
a(RepliesActivity repliesActivity) {
this.a = repliesActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((F.c) cVar.a()).c() == 1) {
g2.L l = new g2.L();
g2.S e = g2.S.m.e(this.a);
if (e != null) {
l.B(e.h());
l.t(e.c());
}
l.x(((F.c) cVar.a()).d());
this.a.u3().b.setText(TtmlNode.ANONYMOUS_REGION_ID);
?? r4 = this.a;
String string = r4.getString(2131952573);
kotlin.jvm.internal.m.d(string, "getString(...)");
r4.r0(string);
} else if (((F.c) cVar.a()).b() == 401) {
this.a.E3();
} else if (((F.c) cVar.a()).b() == 403) {
?? r42 = this.a;
String string2 = r42.getString(2131951991);
kotlin.jvm.internal.m.d(string2, "getString(...)");
r42.r0(string2);
} else {
String a = ((F.c) cVar.a()).a();
if (a != null && a.length() != 0) {
this.a.r0(((F.c) cVar.a()).a());
}
}
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
d(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return RepliesActivity.this.new d(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c = W2.b.c();
int i = this.a;
if (i == 0) {
R2.n.b(obj);
r3.I p = RepliesActivity.this.w3().p();
a aVar = new a(RepliesActivity.this);
this.a = 1;
if (p.collect(aVar, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
}
throw new R2.d();
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((d) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public static final class e implements f2.J {
e() {
}
@Override
public void a(g2.S user) {
kotlin.jvm.internal.m.e(user, "user");
Intent intent = new Intent((Context) RepliesActivity.this, (Class<?>) PublicProfileActivity.class);
intent.putExtra("user", user);
AppCompatActivity appCompatActivity = RepliesActivity.this;
appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
}
@Override
public void b() {
}
}
public static final class f implements f2.J {
f() {
}
@Override
public void a(g2.S user) {
kotlin.jvm.internal.m.e(user, "user");
Intent intent = new Intent((Context) RepliesActivity.this, (Class<?>) PublicProfileActivity.class);
intent.putExtra("user", user);
AppCompatActivity appCompatActivity = RepliesActivity.this;
appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
}
@Override
public void b() {
}
}
public static final class g implements InterfaceC0910A {
g() {
}
@Override
public void b() {
RepliesActivity.this.Z2();
}
@Override
public void c(C0947H reply) {
kotlin.jvm.internal.m.e(reply, "reply");
if (UptodownApp.F.a0()) {
if (!u2.I.a.h(reply.c())) {
RepliesActivity.this.w3().r(RepliesActivity.this, reply);
return;
}
?? r4 = RepliesActivity.this;
String string = r4.getString(2131952572);
kotlin.jvm.internal.m.d(string, "getString(...)");
r4.r0(string);
}
}
@Override
public void d(C0947H reply) {
kotlin.jvm.internal.m.e(reply, "reply");
RepliesActivity.this.H3(reply);
}
}
public static final class h extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public h(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
public static final class i extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public i(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class j extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
final ComponentActivity b;
public j(d3.a aVar, ComponentActivity componentActivity) {
super(0);
this.a = aVar;
this.b = componentActivity;
}
@Override
public final CreationExtras invoke() {
CreationExtras creationExtras;
d3.a aVar = this.a;
return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final boolean A3(RepliesActivity repliesActivity, TextView textView, int i4, KeyEvent keyEvent) {
if (i4 != 6) {
return false;
}
repliesActivity.F3();
return true;
}
public static final void B3(RepliesActivity repliesActivity) {
if (repliesActivity.w3().m() || repliesActivity.w3().h() || repliesActivity.u3().l.getLayoutManager() == null) {
return;
}
RecyclerView.LayoutManager layoutManager = repliesActivity.u3().l.getLayoutManager();
kotlin.jvm.internal.m.b(layoutManager);
int childCount = layoutManager.getChildCount();
RecyclerView.LayoutManager layoutManager2 = repliesActivity.u3().l.getLayoutManager();
kotlin.jvm.internal.m.b(layoutManager2);
int itemCount = layoutManager2.getItemCount();
LinearLayoutManager layoutManager3 = repliesActivity.u3().l.getLayoutManager();
kotlin.jvm.internal.m.b(layoutManager3);
if (childCount + layoutManager3.findFirstVisibleItemPosition() >= itemCount - 10) {
C0469y c0469y = repliesActivity.L;
if (c0469y != null) {
c0469y.b(true);
}
F w3 = repliesActivity.w3();
Object value = repliesActivity.w3().o().getValue();
kotlin.jvm.internal.m.b(value);
long f4 = ((g2.L) value).f();
C0469y c0469y2 = repliesActivity.L;
kotlin.jvm.internal.m.b(c0469y2);
w3.g(repliesActivity, f4, c0469y2.getItemCount());
}
}
public static final void C3(RepliesActivity repliesActivity, View view) {
repliesActivity.getOnBackPressedDispatcher().onBackPressed();
}
public static final void D3(RepliesActivity repliesActivity, View view) {
repliesActivity.F3();
}
public final void E3() {
g2.S.m.a(this);
G3();
}
private final void F3() {
x3();
if (u3().b.getText() == null || m3.m.u0(u3().b.getText().toString()).toString().length() <= 0) {
if (m3.m.u0(u3().b.getText().toString()).toString().length() == 0) {
String string = getString(2131951992);
kotlin.jvm.internal.m.d(string, "getString(...)");
r0(string);
return;
}
return;
}
if (g2.L.o.b(this, u3().b.getText().toString())) {
u3().b.setText(TtmlNode.ANONYMOUS_REGION_ID);
return;
}
a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
Context applicationContext = getApplicationContext();
kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
c0191a.J0(applicationContext, u3().b.getText().toString());
Context applicationContext2 = getApplicationContext();
kotlin.jvm.internal.m.d(applicationContext2, "getApplicationContext(...)");
c0191a.K0(applicationContext2, String.valueOf(System.currentTimeMillis()));
F w3 = w3();
String obj = u3().b.getText().toString();
Object value = w3().o().getValue();
kotlin.jvm.internal.m.b(value);
w3.t(this, obj, ((g2.L) value).f());
}
private final void G3() {
if (isFinishing()) {
return;
}
startActivity(new Intent(getApplicationContext(), (Class<?>) LoginActivity.class), UptodownApp.F.a(this));
}
public final void H3(C0947H c0947h) {
C0563l c0563l = new C0563l(this, LifecycleOwnerKt.getLifecycleScope(this));
String g4 = c0947h.g();
kotlin.jvm.internal.m.b(g4);
c0563l.c(g4, new e());
}
private final void I3(g2.L l) {
C0563l c0563l = new C0563l(this, LifecycleOwnerKt.getLifecycleScope(this));
String l4 = l.l();
kotlin.jvm.internal.m.b(l4);
c0563l.c(l4, new f());
}
private final void J3(final g2.L l) {
if (!l.o()) {
u3().g.l.setVisibility(8);
u3().g.k.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.O3(RepliesActivity.this, l, view);
}
});
if (u2.I.a.i(l.f())) {
u3().g.d.setImageDrawable(ContextCompat.getDrawable(this, 2131231426));
}
TextView textView = u3().g.p;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.x());
u3().g.p.setText(String.valueOf(l.g()));
u3().g.e.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231525));
u3().g.f.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231523));
u3().g.g.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231523));
u3().g.h.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231523));
u3().g.i.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231523));
if (l.h() >= 2) {
u3().g.f.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231525));
}
if (l.h() >= 3) {
u3().g.g.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231525));
}
if (l.h() >= 4) {
u3().g.h.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231525));
}
if (l.h() == 5) {
u3().g.i.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231525));
}
u3().g.t.setTypeface(aVar.w());
u3().g.o.setTypeface(aVar.x());
u3().g.n.setTypeface(aVar.x());
u3().g.q.setTypeface(aVar.x());
S.b bVar = g2.S.m;
String c4 = bVar.c(l.e());
if (c4 == null || c4.length() == 0) {
com.squareup.picasso.s.h().j(2131231564).n(UptodownApp.F.h0(this)).i(u3().g.c);
} else {
com.squareup.picasso.s.h().l(bVar.c(l.e())).n(UptodownApp.F.h0(this)).i(u3().g.c);
}
String m = l.m();
if (m == null || m.length() == 0) {
CharSequence charSequence = (CharSequence) w3().q().getValue();
if (charSequence != null && charSequence.length() != 0) {
u3().g.t.setText((CharSequence) w3().q().getValue());
UsernameTextView.a aVar2 = UsernameTextView.k;
UsernameTextView tvUsernameReview = u3().g.t;
kotlin.jvm.internal.m.d(tvUsernameReview, "tvUsernameReview");
aVar2.a(tvUsernameReview, l.o(), l.n());
}
} else {
u3().g.t.setText(l.m());
UsernameTextView.a aVar3 = UsernameTextView.k;
UsernameTextView tvUsernameReview2 = u3().g.t;
kotlin.jvm.internal.m.d(tvUsernameReview2, "tvUsernameReview");
aVar3.a(tvUsernameReview2, l.o(), l.n());
}
String k = l.k();
if (k != null && k.length() != 0) {
u3().g.o.setText(l.k());
}
String i4 = l.i();
if (i4 == null || i4.length() == 0) {
u3().g.n.setVisibility(8);
} else {
u3().g.n.setMaxLines(Integer.MAX_VALUE);
TextView textView2 = u3().g.n;
Spanned j4 = l.j();
textView2.setText(j4 != null ? m3.m.u0(j4) : null);
if (l.a() > 0) {
u3().g.q.setText(String.valueOf(l.a()));
}
}
if (l.d() == 1) {
u3().g.b.setVisibility(0);
}
String l4 = l.l();
if (l4 == null || l4.length() == 0) {
return;
}
u3().g.t.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.P3(RepliesActivity.this, l, view);
}
});
u3().g.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.Q3(RepliesActivity.this, l, view);
}
});
return;
}
u3().h.l.setVisibility(8);
u3().h.k.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.K3(RepliesActivity.this, l, view);
}
});
if (u2.I.a.i(l.f())) {
u3().h.d.setImageDrawable(ContextCompat.getDrawable(this, 2131231426));
}
TextView textView3 = u3().h.p;
k.a aVar4 = N1.k.g;
textView3.setTypeface(aVar4.x());
u3().h.p.setText(String.valueOf(l.g()));
u3().h.e.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231526));
u3().h.f.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231524));
u3().h.g.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231524));
u3().h.h.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231524));
u3().h.i.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231524));
if (l.h() >= 2) {
u3().h.f.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231526));
}
if (l.h() >= 3) {
u3().h.g.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231526));
}
if (l.h() >= 4) {
u3().h.h.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231526));
}
if (l.h() == 5) {
u3().h.i.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), 2131231526));
}
u3().h.t.setTypeface(aVar4.w());
u3().h.o.setTypeface(aVar4.x());
u3().h.n.setTypeface(aVar4.x());
u3().h.q.setTypeface(aVar4.x());
S.b bVar2 = g2.S.m;
String c5 = bVar2.c(l.e());
if (c5 == null || c5.length() == 0) {
com.squareup.picasso.s.h().j(2131231564).n(UptodownApp.F.h0(this)).i(u3().h.c);
} else {
com.squareup.picasso.s.h().l(bVar2.c(l.e())).n(UptodownApp.F.h0(this)).i(u3().h.c);
}
String m4 = l.m();
if (m4 == null || m4.length() == 0) {
CharSequence charSequence2 = (CharSequence) w3().q().getValue();
if (charSequence2 != null && charSequence2.length() != 0) {
u3().h.t.setText((CharSequence) w3().q().getValue());
UsernameTextView.a aVar5 = UsernameTextView.k;
UsernameTextView tvUsernameReview3 = u3().h.t;
kotlin.jvm.internal.m.d(tvUsernameReview3, "tvUsernameReview");
aVar5.a(tvUsernameReview3, l.o(), l.n());
}
} else {
u3().h.t.setText(l.m());
UsernameTextView.a aVar6 = UsernameTextView.k;
UsernameTextView tvUsernameReview4 = u3().h.t;
kotlin.jvm.internal.m.d(tvUsernameReview4, "tvUsernameReview");
aVar6.a(tvUsernameReview4, l.o(), l.n());
}
String k4 = l.k();
if (k4 != null && k4.length() != 0) {
u3().h.o.setText(l.k());
}
String i5 = l.i();
if (i5 == null || i5.length() == 0) {
u3().h.n.setVisibility(8);
} else {
u3().h.n.setMaxLines(Integer.MAX_VALUE);
TextView textView4 = u3().h.n;
Spanned j5 = l.j();
textView4.setText(j5 != null ? m3.m.u0(j5) : null);
if (l.a() > 1) {
u3().h.q.setText(String.valueOf(l.a()));
}
}
if (l.d() == 1) {
u3().h.b.setVisibility(0);
}
String l5 = l.l();
if (l5 != null && l5.length() != 0) {
u3().h.t.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.L3(RepliesActivity.this, l, view);
}
});
u3().h.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.M3(RepliesActivity.this, l, view);
}
});
}
u3().h.j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.N3(RepliesActivity.this, view);
}
});
u3().h.j.setVisibility(0);
p.a aVar7 = u2.p.a;
ImageView ivAvatarReview = u3().h.c;
kotlin.jvm.internal.m.d(ivAvatarReview, "ivAvatarReview");
aVar7.a(ivAvatarReview);
u3().h.getRoot().setVisibility(0);
u3().g.getRoot().setVisibility(8);
}
public static final void K3(RepliesActivity repliesActivity, g2.L l, View view) {
if (UptodownApp.F.a0()) {
y2.n nVar = new y2.n(repliesActivity);
ImageView ivLikesCounterReview = repliesActivity.u3().h.d;
kotlin.jvm.internal.m.d(ivLikesCounterReview, "ivLikesCounterReview");
nVar.n(ivLikesCounterReview);
if (u2.I.a.i(l.f())) {
return;
}
repliesActivity.w3().s(repliesActivity, l);
repliesActivity.u3().h.p.setText(String.valueOf(l.g() + 1));
}
}
public static final void L3(RepliesActivity repliesActivity, g2.L l, View view) {
repliesActivity.I3(l);
}
public static final void M3(RepliesActivity repliesActivity, g2.L l, View view) {
repliesActivity.I3(l);
}
public static final void N3(RepliesActivity repliesActivity, View view) {
repliesActivity.Z2();
}
public static final void O3(RepliesActivity repliesActivity, g2.L l, View view) {
if (UptodownApp.F.a0()) {
y2.n nVar = new y2.n(repliesActivity);
ImageView ivLikesCounterReview = repliesActivity.u3().g.d;
kotlin.jvm.internal.m.d(ivLikesCounterReview, "ivLikesCounterReview");
nVar.n(ivLikesCounterReview);
if (u2.I.a.i(l.f())) {
return;
}
repliesActivity.w3().s(repliesActivity, l);
repliesActivity.u3().g.p.setText(String.valueOf(l.g() + 1));
}
}
public static final void P3(RepliesActivity repliesActivity, g2.L l, View view) {
repliesActivity.I3(l);
}
public static final void Q3(RepliesActivity repliesActivity, g2.L l, View view) {
repliesActivity.I3(l);
}
private final void R3() {
S.b bVar = g2.S.m;
g2.S e4 = bVar.e(this);
if ((e4 != null ? e4.a() : null) == null) {
u3().c.setImageDrawable(ContextCompat.getDrawable(this, 2131231564));
return;
}
com.squareup.picasso.s.h().l(bVar.c(e4.a())).l(2131231321).n(UptodownApp.F.h0(this)).i(u3().c);
if (e4.n()) {
p.a aVar = u2.p.a;
ImageView ivUserAvatarReply = u3().c;
kotlin.jvm.internal.m.d(ivUserAvatarReply, "ivUserAvatarReply");
aVar.b(ivUserAvatarReply);
}
}
private final void S3() {
g2.S e4 = g2.S.m.e(this);
if ((e4 != null ? e4.g() : null) != null) {
String g4 = e4.g();
kotlin.jvm.internal.m.b(g4);
if (g4.length() > 0) {
u3().e.setVisibility(8);
return;
}
}
u3().e.setVisibility(0);
}
public static final C0611v0 t3(RepliesActivity repliesActivity) {
return C0611v0.c(repliesActivity.getLayoutInflater());
}
private final void v3(long j4) {
w3().f(this, j4);
}
private final void x3() {
Object systemService = getSystemService("input_method");
kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
((InputMethodManager) systemService).hideSoftInputFromWindow(u3().b.getWindowToken(), 0);
}
private final void y3() {
Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
if (drawable != null) {
u3().m.setNavigationIcon(drawable);
u3().m.setNavigationContentDescription(getString(2131951721));
}
u3().m.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.C3(RepliesActivity.this, view);
}
});
TextView textView = u3().n;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
g2.L l = (g2.L) w3().o().getValue();
String c4 = l != null ? l.c() : null;
if (c4 == null || c4.length() == 0) {
CharSequence charSequence = (CharSequence) w3().i().getValue();
if (charSequence != null && charSequence.length() != 0) {
u3().n.setText((CharSequence) w3().i().getValue());
}
} else {
TextView textView2 = u3().n;
g2.L l4 = (g2.L) w3().o().getValue();
textView2.setText(l4 != null ? l4.c() : null);
}
u3().o.setTypeface(aVar.x());
R3();
u3().p.setTypeface(aVar.w());
u3().p.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.D3(RepliesActivity.this, view);
}
});
u3().e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RepliesActivity.z3(RepliesActivity.this, view);
}
});
u3().b.setTypeface(aVar.x());
u3().b.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public final boolean onEditorAction(TextView textView3, int i4, KeyEvent keyEvent) {
boolean A3;
A3 = RepliesActivity.A3(RepliesActivity.this, textView3, i4, keyEvent);
return A3;
}
});
S3();
u3().l.setLayoutManager(new LinearLayoutManager(this, 1, false));
u3().l.setItemAnimator(new DefaultItemAnimator());
u3().f.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public final void onScrollChanged() {
RepliesActivity.B3(RepliesActivity.this);
}
});
if (w3().o().getValue() == null) {
finish();
return;
}
Object value = w3().o().getValue();
kotlin.jvm.internal.m.b(value);
v3(((g2.L) value).f());
Object value2 = w3().o().getValue();
kotlin.jvm.internal.m.b(value2);
J3((g2.L) value2);
}
public static final void z3(RepliesActivity repliesActivity, View view) {
repliesActivity.G3();
}
@Override
protected void onCreate(Bundle bundle) {
Bundle extras;
Parcelable parcelable;
Object parcelable2;
super.onCreate(bundle);
setContentView(u3().getRoot());
Intent intent = getIntent();
if (intent != null && (extras = intent.getExtras()) != null) {
if (extras.containsKey("review")) {
r3.t o = w3().o();
if (Build.VERSION.SDK_INT >= 33) {
parcelable2 = extras.getParcelable("review", g2.L.class);
parcelable = (Parcelable) parcelable2;
} else {
parcelable = extras.getParcelable("review");
}
o.setValue(parcelable);
}
if (extras.containsKey("appName")) {
w3().i().setValue(extras.getString("appName"));
}
if (extras.containsKey("username")) {
w3().q().setValue(extras.getString("username"));
}
}
y3();
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new a(null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new b(null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new c(null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new d(null), 2, (Object) null);
}
@Override
protected void onResume() {
super.onResume();
S3();
R3();
}
public final C0611v0 u3() {
return (C0611v0) this.J.getValue();
}
public final F w3() {
return (F) this.K.getValue();
}
}