正在查看: Uptodown App Store v6.80 应用的 PublicProfileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 PublicProfileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import M1.C0468x;
import N1.k;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
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.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import b2.C0563l;
import c2.C0603r0;
import com.uptodown.UptodownApp;
import com.uptodown.activities.E;
import com.uptodown.activities.PublicProfileActivity;
import com.uptodown.util.views.UsernameTextView;
import f2.InterfaceC0911B;
import f2.InterfaceC0919b;
import g2.C0955f;
import g2.L;
import java.util.ArrayList;
import java.util.Collection;
import u2.H;
import u2.p;
public final class PublicProfileActivity extends AbstractC0740a {
private final R2.g J = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
C0603r0 m32;
m32 = PublicProfileActivity.m3(PublicProfileActivity.this);
return m32;
}
});
private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(E.class), new e(this), new d(this), new f(null, this));
private M1.Z L;
private final ActivityResultLauncher M;
static final class a extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
final kotlin.jvm.internal.C c;
final g2.S d;
static final class C0178a implements r3.f {
final PublicProfileActivity a;
final kotlin.jvm.internal.C b;
final g2.S c;
public static final class C0179a implements InterfaceC0919b {
final PublicProfileActivity a;
final u2.H b;
C0179a(PublicProfileActivity publicProfileActivity, u2.H h) {
this.a = publicProfileActivity;
this.b = h;
}
@Override
public void a(int i) {
this.a.D2(((C0955f) ((E.a) ((H.c) this.b).a()).a().get(i)).e());
}
@Override
public void b(int i) {
}
}
public static final class b implements InterfaceC0911B {
final u2.H a;
final PublicProfileActivity b;
b(u2.H h, PublicProfileActivity publicProfileActivity) {
this.a = h;
this.b = publicProfileActivity;
}
@Override
public void a(int i) {
Object obj = ((E.a) ((H.c) this.a).a()).b().get(i);
kotlin.jvm.internal.m.d(obj, "get(...)");
this.b.p3().l(this.b, (g2.L) obj);
}
@Override
public void b() {
this.b.Z2();
}
@Override
public void c(int i) {
Object obj = ((E.a) ((H.c) this.a).a()).b().get(i);
kotlin.jvm.internal.m.d(obj, "get(...)");
this.b.D2(((g2.L) obj).b());
}
@Override
public void d(int i) {
Object obj = ((E.a) ((H.c) this.a).a()).b().get(i);
kotlin.jvm.internal.m.d(obj, "get(...)");
g2.L l = (g2.L) obj;
Intent intent = new Intent((Context) this.b, (Class<?>) RepliesActivity.class);
intent.putExtra("review", l);
intent.putExtra("appName", l.c());
intent.putExtra("username", l.m());
AppCompatActivity appCompatActivity = this.b;
appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
}
}
C0178a(PublicProfileActivity publicProfileActivity, kotlin.jvm.internal.C c, g2.S s) {
this.a = publicProfileActivity;
this.b = c;
this.c = s;
}
public static final void j(kotlin.jvm.internal.C c, g2.S s, PublicProfileActivity publicProfileActivity, View view) {
Object obj = c.a;
kotlin.jvm.internal.m.b(obj);
if (kotlin.jvm.internal.m.a(((g2.S) obj).g(), s != null ? s.g() : null)) {
publicProfileActivity.startActivity(new Intent((Context) publicProfileActivity, (Class<?>) RecommendedActivity.class), UptodownApp.F.a(publicProfileActivity));
return;
}
Intent intent = new Intent((Context) publicProfileActivity, (Class<?>) PublicListActivity.class);
intent.putExtra("user", (Parcelable) c.a);
publicProfileActivity.startActivity(intent, UptodownApp.F.a(publicProfileActivity));
}
public static final void k(PublicProfileActivity publicProfileActivity, View view) {
publicProfileActivity.n3();
}
public static final void l(PublicProfileActivity publicProfileActivity, kotlin.jvm.internal.C c, View view) {
Intent intent = new Intent((Context) publicProfileActivity, (Class<?>) UserCommentsActivity.class);
g2.S s = (g2.S) c.a;
intent.putExtra("userID", s != null ? s.g() : null);
publicProfileActivity.startActivity(intent, UptodownApp.F.a(publicProfileActivity));
}
public static final void m(PublicProfileActivity publicProfileActivity, View view) {
publicProfileActivity.n3();
}
public final Object emit(u2.H h, V2.d dVar) {
if (h instanceof H.a) {
this.a.o3().f.setVisibility(0);
} else if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((E.a) cVar.a()).a().isEmpty()) {
g2.S s = (g2.S) this.b.a;
String g = s != null ? s.g() : null;
g2.S s3 = this.c;
if (kotlin.jvm.internal.m.a(g, s3 != null ? s3.g() : null)) {
this.a.o3().g.e.setVisibility(8);
this.a.o3().g.c.setVisibility(0);
TextView textView = this.a.o3().g.f;
final PublicProfileActivity publicProfileActivity = this.a;
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.a.C0178a.k(PublicProfileActivity.this, view);
}
});
}
} else {
this.a.o3().g.e.setAdapter(new C0468x(((E.a) cVar.a()).a(), new C0179a(this.a, h)));
this.a.o3().g.getRoot().setVisibility(0);
RelativeLayout relativeLayout = this.a.o3().g.d;
final kotlin.jvm.internal.C c = this.b;
final g2.S s4 = this.c;
final PublicProfileActivity publicProfileActivity2 = this.a;
relativeLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.a.C0178a.j(kotlin.jvm.internal.C.this, s4, publicProfileActivity2, view);
}
});
}
if (((E.a) cVar.a()).b().isEmpty()) {
g2.S s5 = (g2.S) this.b.a;
String g4 = s5 != null ? s5.g() : null;
g2.S s6 = this.c;
if (kotlin.jvm.internal.m.a(g4, s6 != null ? s6.g() : null)) {
this.a.o3().h.getRoot().setVisibility(0);
this.a.o3().h.e.setVisibility(8);
this.a.o3().h.c.setVisibility(0);
TextView textView2 = this.a.o3().h.f;
final PublicProfileActivity publicProfileActivity3 = this.a;
textView2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.a.C0178a.m(PublicProfileActivity.this, view);
}
});
}
} else {
this.a.o3().h.e.setAdapter(new M1.Z(((E.a) cVar.a()).b(), new b(h, this.a)));
this.a.o3().h.getRoot().setVisibility(0);
RelativeLayout relativeLayout2 = this.a.o3().h.d;
final PublicProfileActivity publicProfileActivity4 = this.a;
final kotlin.jvm.internal.C c4 = this.b;
relativeLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.a.C0178a.l(PublicProfileActivity.this, c4, view);
}
});
}
this.a.o3().f.setVisibility(8);
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
return R2.s.a;
}
}
a(kotlin.jvm.internal.C c, g2.S s, V2.d dVar) {
super(2, dVar);
this.c = c;
this.d = s;
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return PublicProfileActivity.this.new a(this.c, this.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 h = PublicProfileActivity.this.p3().h();
C0178a c0178a = new C0178a(PublicProfileActivity.this, this.c, this.d);
this.a = 1;
if (h.collect(c0178a, 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;
final kotlin.jvm.internal.C c;
final g2.S d;
static final class a implements r3.f {
final PublicProfileActivity a;
final kotlin.jvm.internal.C b;
final g2.S c;
public static final class C0180a implements InterfaceC0919b {
final PublicProfileActivity a;
final u2.H b;
C0180a(PublicProfileActivity publicProfileActivity, u2.H h) {
this.a = publicProfileActivity;
this.b = h;
}
@Override
public void a(int i) {
this.a.D2(((C0955f) ((ArrayList) ((H.c) this.b).a()).get(i)).e());
}
@Override
public void b(int i) {
}
}
a(PublicProfileActivity publicProfileActivity, kotlin.jvm.internal.C c, g2.S s) {
this.a = publicProfileActivity;
this.b = c;
this.c = s;
}
public static final void h(PublicProfileActivity publicProfileActivity, View view) {
publicProfileActivity.startActivity(new Intent((Context) publicProfileActivity, (Class<?>) WishlistActivity.class));
}
public static final void i(PublicProfileActivity publicProfileActivity, View view) {
publicProfileActivity.n3();
}
public final Object emit(u2.H h, V2.d dVar) {
if (!(h instanceof H.a)) {
if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((Collection) cVar.a()).isEmpty()) {
g2.S s = (g2.S) this.b.a;
String g = s != null ? s.g() : null;
g2.S s3 = this.c;
if (kotlin.jvm.internal.m.a(g, s3 != null ? s3.g() : null)) {
this.a.o3().t.getRoot().setVisibility(0);
this.a.o3().t.e.setVisibility(8);
this.a.o3().t.c.setVisibility(0);
TextView textView = this.a.o3().t.f;
final PublicProfileActivity publicProfileActivity = this.a;
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.b.a.i(PublicProfileActivity.this, view);
}
});
}
} else {
this.a.o3().t.e.setAdapter(new C0468x((ArrayList) cVar.a(), new C0180a(this.a, h)));
this.a.o3().t.getRoot().setVisibility(0);
this.a.o3().t.e.setVisibility(0);
this.a.o3().t.c.setVisibility(8);
RelativeLayout relativeLayout = this.a.o3().t.d;
final PublicProfileActivity publicProfileActivity2 = this.a;
relativeLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.b.a.h(PublicProfileActivity.this, view);
}
});
}
this.a.o3().f.setVisibility(8);
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
b(kotlin.jvm.internal.C c, g2.S s, V2.d dVar) {
super(2, dVar);
this.c = c;
this.d = s;
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return PublicProfileActivity.this.new b(this.c, this.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 k = PublicProfileActivity.this.p3().k();
a aVar = new a(PublicProfileActivity.this, this.c, this.d);
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 ((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 PublicProfileActivity a;
a(PublicProfileActivity publicProfileActivity) {
this.a = publicProfileActivity;
}
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) {
M1.Z z = this.a.L;
if (z != null) {
z.d(((L.c) cVar.a()).a());
}
} 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 PublicProfileActivity.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 g = PublicProfileActivity.this.p3().g();
a aVar = new a(PublicProfileActivity.this);
this.a = 1;
if (g.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);
}
}
public static final class d extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public d(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
public static final class e extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public e(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class f extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
final ComponentActivity b;
public f(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 class g implements f2.J {
g() {
}
@Override
public void a(g2.S user) {
kotlin.jvm.internal.m.e(user, "user");
PublicProfileActivity.this.v3(user);
}
@Override
public void b() {
}
}
public PublicProfileActivity() {
ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
PublicProfileActivity.w3(PublicProfileActivity.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
this.M = registerForActivityResult;
}
public static final C0603r0 m3(PublicProfileActivity publicProfileActivity) {
return C0603r0.c(publicProfileActivity.getLayoutInflater());
}
public final void n3() {
setResult(1);
finish();
}
public final C0603r0 o3() {
return (C0603r0) this.J.getValue();
}
public final E p3() {
return (E) this.K.getValue();
}
private final void q3(final g2.S s) {
setContentView(o3().getRoot());
o3().j.setNavigationIcon(ContextCompat.getDrawable(this, 2131231396));
o3().j.setNavigationContentDescription(getString(2131951721));
o3().j.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.r3(PublicProfileActivity.this, view);
}
});
o3().i.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public final void onScrollChanged() {
PublicProfileActivity.s3(PublicProfileActivity.this);
}
});
AppCompatTextView appCompatTextView = o3().p;
k.a aVar = N1.k.g;
appCompatTextView.setTypeface(aVar.w());
o3().q.setTypeface(aVar.x());
o3().m.setTypeface(aVar.w());
o3().k.setTypeface(aVar.x());
o3().l.setTypeface(aVar.w());
o3().r.setTypeface(aVar.x());
o3().s.setTypeface(aVar.w());
o3().n.setTypeface(aVar.x());
o3().o.setTypeface(aVar.w());
o3().g.h.setTypeface(aVar.w());
o3().g.f.setTypeface(aVar.w());
o3().g.g.setTypeface(aVar.x());
o3().t.h.setTypeface(aVar.w());
o3().t.f.setTypeface(aVar.w());
o3().t.g.setTypeface(aVar.x());
o3().h.h.setTypeface(aVar.w());
o3().h.f.setTypeface(aVar.w());
o3().h.g.setTypeface(aVar.x());
v3(s);
o3().g.e.setLayoutManager(new LinearLayoutManager(this, 0, false));
o3().g.e.setItemAnimator((RecyclerView.ItemAnimator) null);
o3().h.e.setLayoutManager(new LinearLayoutManager(this, 0, false));
final g2.S e4 = g2.S.m.e(this);
if (!kotlin.jvm.internal.m.a(s.g(), e4 != null ? e4.g() : null)) {
o3().m.setVisibility(8);
o3().g.h.setText(getString(2131952547));
o3().h.h.setText(getString(2131952525));
return;
}
o3().t.e.setLayoutManager(new LinearLayoutManager(this, 0, false));
o3().t.e.setItemAnimator((RecyclerView.ItemAnimator) null);
o3().t.h.setText(getString(2131952395));
o3().g.h.setText(getString(2131952394));
o3().h.g.setText(getString(2131952393));
o3().h.h.setText(getString(2131952528));
o3().m.setVisibility(0);
o3().m.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.t3(g2.S.this, this, view);
}
});
o3().c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PublicProfileActivity.u3(PublicProfileActivity.this, s, view);
}
});
}
public static final void r3(PublicProfileActivity publicProfileActivity, View view) {
publicProfileActivity.finish();
}
public static final void s3(PublicProfileActivity publicProfileActivity) {
int scrollY = publicProfileActivity.o3().i.getScrollY();
float dimension = publicProfileActivity.getResources().getDimension(2131166304) * 0.7f;
int alphaComponent = ColorUtils.setAlphaComponent(ContextCompat.getColor(publicProfileActivity, 2131099685), (int) (j3.e.e(scrollY / dimension, 0.0f, 1.0f) * 255));
if (scrollY >= dimension * 0.5d) {
publicProfileActivity.o3().j.setNavigationIcon(ContextCompat.getDrawable(publicProfileActivity, N1.e.c));
} else {
publicProfileActivity.o3().j.setNavigationIcon(ContextCompat.getDrawable(publicProfileActivity, 2131231396));
}
publicProfileActivity.o3().j.setBackgroundColor(alphaComponent);
}
public static final void t3(g2.S s, PublicProfileActivity publicProfileActivity, View view) {
if (s == null || !s.m(publicProfileActivity)) {
return;
}
publicProfileActivity.M.launch(new Intent((Context) publicProfileActivity, (Class<?>) UserEditProfileActivity.class), UptodownApp.F.b(publicProfileActivity));
}
public static final void u3(PublicProfileActivity publicProfileActivity, g2.S s, View view) {
Intent intent = new Intent((Context) publicProfileActivity, (Class<?>) UserAvatarActivity.class);
intent.putExtra("user", s);
publicProfileActivity.M.launch(intent, UptodownApp.F.b(publicProfileActivity));
}
public final void v3(g2.S s) {
UsernameTextView.a aVar = UsernameTextView.k;
UsernameTextView tvNamePublicProfile = o3().p;
kotlin.jvm.internal.m.d(tvNamePublicProfile, "tvNamePublicProfile");
aVar.a(tvNamePublicProfile, s.n(), s.l());
o3().p.setText(s.h());
o3().q.setText(s.i());
String d4 = s.d();
if (d4 != null && d4.length() != 0 && o3().b.getDrawable() == null) {
com.squareup.picasso.s.h().l(s.d()).f().i(o3().b);
}
String b4 = s.b();
if (b4 != null && b4.length() != 0) {
com.squareup.picasso.s.h().l(g2.S.m.c(s.a())).n(UptodownApp.F.j0(this)).i(o3().c);
o3().c.setBackground(ContextCompat.getDrawable(this, 2131231294));
}
if (s.n()) {
p.a aVar2 = u2.p.a;
ImageView ivIconPublicProfile = o3().c;
kotlin.jvm.internal.m.d(ivIconPublicProfile, "ivIconPublicProfile");
aVar2.a(ivIconPublicProfile);
o3().d.setVisibility(0);
}
o3().s.setText(String.valueOf(s.j()));
}
public static final void w3(PublicProfileActivity publicProfileActivity, ActivityResult activityResult) {
g2.S e4;
String g4;
if (activityResult.getResultCode() != 10 || (e4 = g2.S.m.e(publicProfileActivity)) == null || (g4 = e4.g()) == null || g4.length() == 0) {
return;
}
new C0563l(publicProfileActivity, LifecycleOwnerKt.getLifecycleScope(publicProfileActivity)).c(String.valueOf(e4.g()), publicProfileActivity.new g());
}
@Override
protected void onCreate(Bundle bundle) {
Bundle extras;
super.onCreate(bundle);
kotlin.jvm.internal.C c4 = new kotlin.jvm.internal.C();
if (getIntent() != null && (extras = getIntent().getExtras()) != null && extras.containsKey("user")) {
c4.a = extras.getParcelable("user");
}
Object obj = c4.a;
if (obj != null) {
q3((g2.S) obj);
p3().f(this, String.valueOf(((g2.S) c4.a).g()));
}
g2.S e4 = g2.S.m.e(this);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new a(c4, e4, null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new b(c4, e4, null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new c(null), 2, (Object) null);
}
}