正在查看: Uptodown App Store v6.80 应用的 OrganizationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 OrganizationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import N1.k;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
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.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.uptodown.UptodownApp;
import com.uptodown.activities.C0760v;
import com.uptodown.activities.OrganizationActivity;
import f2.InterfaceC0921d;
import g2.C0941B;
import g2.C0955f;
import g2.C0965p;
import u2.H;
public final class OrganizationActivity extends AbstractC0740a {
private final R2.g J = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
c2.Y o3;
o3 = OrganizationActivity.o3(OrganizationActivity.this);
return o3;
}
});
private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(C0760v.class), new d(this), new c(this), new e(null, this));
private M1.r L;
public static final class a implements InterfaceC0921d {
a() {
}
@Override
public void a(C0955f app) {
kotlin.jvm.internal.m.e(app, "app");
if (UptodownApp.F.a0()) {
OrganizationActivity.this.D2(app.e());
}
}
}
static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final OrganizationActivity a;
a(OrganizationActivity organizationActivity) {
this.a = organizationActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (kotlin.jvm.internal.m.a(h, H.a.a)) {
if (this.a.L == null) {
this.a.q3().g.setVisibility(0);
}
} else if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((C0760v.a) cVar.a()).a()) {
M1.r rVar = this.a.L;
kotlin.jvm.internal.m.b(rVar);
rVar.a(((C0760v.a) cVar.a()).b().j());
} else {
this.a.s3(((C0760v.a) cVar.a()).b());
this.a.p3(((C0760v.a) cVar.a()).b());
}
this.a.q3().g.setVisibility(8);
this.a.q3().k.setVisibility(0);
M1.r rVar2 = this.a.L;
if (rVar2 != null) {
rVar2.c(false);
}
} else {
if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
throw new R2.k();
}
M1.r rVar3 = this.a.L;
if (rVar3 != null) {
rVar3.c(false);
}
}
return R2.s.a;
}
}
b(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return OrganizationActivity.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 h = OrganizationActivity.this.r3().h();
a aVar = new a(OrganizationActivity.this);
this.a = 1;
if (h.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);
}
}
public static final class c extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public c(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
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 ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class e extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
final ComponentActivity b;
public e(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;
}
}
static final class f extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
final C0965p b;
final OrganizationActivity c;
f(C0965p c0965p, OrganizationActivity organizationActivity, V2.d dVar) {
super(2, dVar);
this.b = c0965p;
this.c = organizationActivity;
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return new f(this.b, this.c, dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
String w;
W2.b.c();
if (this.a != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
C0965p c0965p = this.b;
if (c0965p != null && (w = c0965p.w()) != null && w.length() != 0 && this.c.L != null) {
M1.r rVar = this.c.L;
kotlin.jvm.internal.m.b(rVar);
String w3 = this.b.w();
kotlin.jvm.internal.m.b(w3);
RecyclerView rvOrganization = this.c.q3().j;
kotlin.jvm.internal.m.d(rvOrganization, "rvOrganization");
rVar.d(w3, rvOrganization);
}
return R2.s.a;
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((f) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public static final void A3(OrganizationActivity organizationActivity, c2.Y y) {
if (organizationActivity.r3().i() || organizationActivity.r3().g()) {
return;
}
ScrollView scrollView = y.k;
if (scrollView.getChildAt(scrollView.getChildCount() - 1).getBottom() - (y.k.getHeight() + y.k.getScrollY()) > 0 || organizationActivity.r3().i() || organizationActivity.r3().g()) {
return;
}
M1.r rVar = organizationActivity.L;
if (rVar != null) {
rVar.c(true);
}
organizationActivity.C3();
}
private final void B3() {
r3().e(this);
}
private final void C3() {
r3().f(this);
}
public static final c2.Y o3(OrganizationActivity organizationActivity) {
return c2.Y.c(organizationActivity.getLayoutInflater());
}
public final void p3(C0941B c0941b) {
String k;
if (this.L == null && (k = c0941b.k()) != null && k.length() != 0) {
a aVar = new a();
String k4 = c0941b.k();
kotlin.jvm.internal.m.b(k4);
this.L = new M1.r(aVar, k4);
q3().j.setAdapter(this.L);
}
M1.r rVar = this.L;
if (rVar != null) {
rVar.b(c0941b.i(), c0941b.g(), c0941b.b(), c0941b.j());
}
}
public final c2.Y q3() {
return (c2.Y) this.J.getValue();
}
public final C0760v r3() {
return (C0760v) this.K.getValue();
}
public final void s3(final C0941B c0941b) {
String a4;
String e4;
if (r3().l()) {
return;
}
final c2.Y q3 = q3();
q3.p.setText(c0941b.k());
String c4 = c0941b.c();
if (c4 == null || c4.length() == 0 || (a4 = c0941b.a()) == null || a4.length() == 0 || (e4 = c0941b.e()) == null || e4.length() == 0) {
q3().i.setVisibility(8);
} else {
String c5 = c0941b.c();
if (c5 != null && c5.length() != 0) {
com.squareup.picasso.s.h().l(c0941b.d()).n(UptodownApp.F.g0(this)).i(q3.b);
}
String e5 = c0941b.e();
if (e5 != null && e5.length() != 0) {
com.squareup.picasso.s.h().l(c0941b.f()).n(UptodownApp.F.h0(this)).i(q3.d);
}
TextView textView = q3.n;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
q3.n.setText(c0941b.k());
q3.q.setTypeface(aVar.w());
q3.q.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.t3(C0941B.this, this, view);
}
});
String m = c0941b.m();
if (m != null && m.length() != 0) {
q3.f.setVisibility(0);
q3.f.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.u3(OrganizationActivity.this, c0941b, view);
}
});
}
String h = c0941b.h();
if (h != null && h.length() != 0) {
q3.c.setVisibility(0);
q3.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.v3(OrganizationActivity.this, c0941b, view);
}
});
}
String l = c0941b.l();
if (l != null && l.length() != 0) {
q3.e.setVisibility(0);
q3.e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.w3(OrganizationActivity.this, c0941b, view);
}
});
}
q3.m.setTypeface(aVar.x());
q3.m.setText(c0941b.a());
q3.o.setTypeface(aVar.w());
q3.o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.x3(C0941B.this, q3, view);
}
});
}
r3().o(true);
}
public static final void t3(C0941B c0941b, OrganizationActivity organizationActivity, View view) {
if (c0941b.n() != null) {
u2.p pVar = new u2.p();
String n = c0941b.n();
kotlin.jvm.internal.m.b(n);
pVar.p(organizationActivity, n, c0941b.k());
}
}
public static final void u3(OrganizationActivity organizationActivity, C0941B c0941b, View view) {
if (organizationActivity.isFinishing()) {
return;
}
u2.p pVar = new u2.p();
String m = c0941b.m();
kotlin.jvm.internal.m.b(m);
u2.p.q(pVar, organizationActivity, m, null, 4, null);
}
public static final void v3(OrganizationActivity organizationActivity, C0941B c0941b, View view) {
if (organizationActivity.isFinishing()) {
return;
}
u2.p pVar = new u2.p();
String h = c0941b.h();
kotlin.jvm.internal.m.b(h);
u2.p.q(pVar, organizationActivity, h, null, 4, null);
}
public static final void w3(OrganizationActivity organizationActivity, C0941B c0941b, View view) {
if (organizationActivity.isFinishing()) {
return;
}
u2.p pVar = new u2.p();
String l = c0941b.l();
kotlin.jvm.internal.m.b(l);
u2.p.q(pVar, organizationActivity, l, null, 4, null);
}
public static final void x3(C0941B c0941b, c2.Y y, View view) {
String a4 = c0941b.a();
if (a4 == null || a4.length() == 0) {
return;
}
if (y.r.getVisibility() == 0) {
y.o.setText(2131952540);
y.r.setVisibility(8);
y.m.setMaxLines(Integer.MAX_VALUE);
y.m.setEllipsize(null);
return;
}
y.o.setText(2131952541);
y.r.setVisibility(0);
y.m.setMaxLines(6);
y.m.setEllipsize(TextUtils.TruncateAt.END);
}
private final void y3() {
setContentView(q3().getRoot());
Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
final c2.Y q3 = q3();
if (drawable != null) {
q3.l.setNavigationIcon(drawable);
q3.l.setNavigationContentDescription(getString(2131951721));
}
q3.l.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
OrganizationActivity.z3(OrganizationActivity.this, view);
}
});
q3.p.setTypeface(N1.k.g.w());
q3.j.setLayoutManager(new LinearLayoutManager(this, 1, false));
q3.j.setItemAnimator((RecyclerView.ItemAnimator) null);
if (((CharSequence) r3().k().getValue()).length() > 0) {
q3.p.setText((CharSequence) r3().k().getValue());
}
q3.k.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public final void onScrollChanged() {
OrganizationActivity.A3(OrganizationActivity.this, q3);
}
});
}
public static final void z3(OrganizationActivity organizationActivity, View view) {
organizationActivity.finish();
}
public final void D3(C0965p c0965p) {
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new f(c0965p, this, null), 2, (Object) null);
}
@Override
protected void onCreate(Bundle bundle) {
Bundle extras;
super.onCreate(bundle);
Intent intent = getIntent();
if (intent != null && (extras = intent.getExtras()) != null) {
if (extras.containsKey("organizationID")) {
r3().j().setValue(Long.valueOf(extras.getLong("organizationID")));
}
if (extras.containsKey("organizationName")) {
r3.t k = r3().k();
String string = extras.getString("organizationName");
kotlin.jvm.internal.m.b(string);
k.setValue(string);
}
}
y3();
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new b(null), 2, (Object) null);
B3();
}
}