导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - ReviewsActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 ReviewsActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.uptodown.activities;

import M1.C0470z;
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.Editable;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
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.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView;
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.C0619z0;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.uptodown.UptodownApp;
import com.uptodown.activities.G;
import com.uptodown.activities.ReviewsActivity;
import f2.InterfaceC0911B;
import g2.C0955f;
import g2.L;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.jvm.internal.AbstractC1009g;
import u2.C1233m;
import u2.H;

public final class ReviewsActivity extends AbstractC0740a {
    public static final a O = new a(null);
    private C0470z L;
    private final ActivityResultLauncher N;
    private final R2.g J = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            C0619z0 t3;
            t3 = ReviewsActivity.t3(ReviewsActivity.this);
            return t3;
        }
    });
    private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(G.class), new g(this), new f(this), new h(null, this));
    private final e M = new e();

    public static final class a {
        public a(AbstractC1009g abstractC1009g) {
            this();
        }

        private a() {
        }
    }

    static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;

        static final class a implements r3.f {
            final ReviewsActivity a;

            a(ReviewsActivity reviewsActivity) {
                this.a = reviewsActivity;
            }

            public final Object emit(u2.H h, V2.d dVar) {
                if (kotlin.jvm.internal.m.a(h, H.a.a)) {
                    this.a.w3().r(true);
                    if (this.a.L == null) {
                        this.a.u3().k.setVisibility(0);
                    }
                } else if (h instanceof H.c) {
                    this.a.w3().r(false);
                    if (this.a.L == null) {
                        this.a.L3(((G.a) ((H.c) h).a()).a());
                        this.a.u3().o.setAdapter(this.a.L);
                    } else {
                        Iterator it = ((G.a) ((H.c) h).a()).a().iterator();
                        kotlin.jvm.internal.m.d(it, "iterator(...)");
                        while (it.hasNext()) {
                            Object next = it.next();
                            kotlin.jvm.internal.m.d(next, "next(...)");
                            C0470z c0470z = this.a.L;
                            kotlin.jvm.internal.m.b(c0470z);
                            c0470z.a((g2.L) next);
                        }
                    }
                    C0470z c0470z2 = this.a.L;
                    if (c0470z2 != null) {
                        c0470z2.c(false);
                    }
                    this.a.u3().k.setVisibility(8);
                } else if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
                    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 ReviewsActivity.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 f = ReviewsActivity.this.w3().f();
                a aVar = new a(ReviewsActivity.this);
                this.a = 1;
                if (f.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 ReviewsActivity a;

            a(ReviewsActivity reviewsActivity) {
                this.a = reviewsActivity;
            }

            public final Object emit(u2.H h, V2.d dVar) {
                if (kotlin.jvm.internal.m.a(h, H.a.a)) {
                    this.a.w3().r(true);
                    this.a.u3().k.setVisibility(0);
                } else if (h instanceof H.c) {
                    H.c cVar = (H.c) h;
                    if (((G.b) cVar.a()).b() == 1) {
                        ?? r3 = this.a;
                        String string = r3.getString(2131952573);
                        kotlin.jvm.internal.m.d(string, "getString(...)");
                        r3.r0(string);
                        this.a.u3().b.setText(TtmlNode.ANONYMOUS_REGION_ID);
                    } else if (((G.b) cVar.a()).a() == 403) {
                        ?? r32 = this.a;
                        String string2 = r32.getString(2131951991);
                        kotlin.jvm.internal.m.d(string2, "getString(...)");
                        r32.r0(string2);
                    } else if (((G.b) cVar.a()).b() == 0 && ((G.b) cVar.a()).a() == 0) {
                        ?? r33 = this.a;
                        String string3 = r33.getString(2131952014);
                        kotlin.jvm.internal.m.d(string3, "getString(...)");
                        r33.r0(string3);
                    } else {
                        ?? r34 = this.a;
                        String string4 = r34.getString(2131952006);
                        kotlin.jvm.internal.m.d(string4, "getString(...)");
                        r34.r0(string4);
                    }
                } else if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
                    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 ReviewsActivity.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 n = ReviewsActivity.this.w3().n();
                a aVar = new a(ReviewsActivity.this);
                this.a = 1;
                if (n.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 ReviewsActivity a;

            a(ReviewsActivity reviewsActivity) {
                this.a = reviewsActivity;
            }

            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) {
                            C0470z c0470z = this.a.L;
                            if (c0470z != null) {
                                c0470z.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;
            }
        }

        d(V2.d dVar) {
            super(2, dVar);
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return ReviewsActivity.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 l = ReviewsActivity.this.w3().l();
                a aVar = new a(ReviewsActivity.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 ((d) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    public static final class e implements InterfaceC0911B {

        public static final class a implements f2.J {
            final ReviewsActivity a;

            a(ReviewsActivity reviewsActivity) {
                this.a = reviewsActivity;
            }

            @Override
            public void a(g2.S user) {
                kotlin.jvm.internal.m.e(user, "user");
                Intent intent = new Intent((Context) this.a, (Class<?>) PublicProfileActivity.class);
                intent.putExtra("user", user);
                AppCompatActivity appCompatActivity = this.a;
                appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
            }

            @Override
            public void b() {
            }
        }

        e() {
        }

        @Override
        public void a(int i) {
            ArrayList b;
            C0470z c0470z = ReviewsActivity.this.L;
            g2.L l = (c0470z == null || (b = c0470z.b()) == null) ? null : (g2.L) b.get(i);
            if (!UptodownApp.F.a0() || l == null || u2.I.a.i(l.f())) {
                return;
            }
            ReviewsActivity.this.w3().o(ReviewsActivity.this, l);
        }

        @Override
        public void b() {
            ReviewsActivity.this.Z2();
        }

        @Override
        public void c(int i) {
            ArrayList b;
            if (UptodownApp.F.a0()) {
                C0470z c0470z = ReviewsActivity.this.L;
                g2.L l = (c0470z == null || (b = c0470z.b()) == null) ? null : (g2.L) b.get(i);
                if (l != null) {
                    AppCompatActivity appCompatActivity = ReviewsActivity.this;
                    C0563l c0563l = new C0563l(appCompatActivity, LifecycleOwnerKt.getLifecycleScope(appCompatActivity));
                    String l4 = l.l();
                    kotlin.jvm.internal.m.b(l4);
                    c0563l.c(l4, new a(ReviewsActivity.this));
                }
            }
        }

        @Override
        public void d(int i) {
            ArrayList b;
            C0470z c0470z = ReviewsActivity.this.L;
            g2.L l = (c0470z == null || (b = c0470z.b()) == null) ? null : (g2.L) b.get(i);
            Intent intent = new Intent((Context) ReviewsActivity.this, (Class<?>) RepliesActivity.class);
            intent.putExtra("review", l);
            C0955f c0955f = (C0955f) ReviewsActivity.this.w3().e().getValue();
            String M = c0955f != null ? c0955f.M() : null;
            if (M != null && M.length() != 0) {
                Object value = ReviewsActivity.this.w3().e().getValue();
                kotlin.jvm.internal.m.b(value);
                intent.putExtra("appName", ((C0955f) value).M());
            }
            AppCompatActivity appCompatActivity = ReviewsActivity.this;
            appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
        }
    }

    public static final class f extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public f(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelProvider.Factory invoke() {
            return this.a.getDefaultViewModelProviderFactory();
        }
    }

    public static final class g extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public g(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelStore invoke() {
            return this.a.getViewModelStore();
        }
    }

    public static final class h extends kotlin.jvm.internal.n implements d3.a {
        final d3.a a;
        final ComponentActivity b;

        public h(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 ReviewsActivity() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                ReviewsActivity.K3(ReviewsActivity.this, (ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
        this.N = registerForActivityResult;
    }

    public static final void A3(ReviewsActivity reviewsActivity, NestedScrollView v, int i, int i4, int i5, int i6) {
        kotlin.jvm.internal.m.e(v, "v");
        if (i4 == v.getChildAt(0).getMeasuredHeight() - v.getMeasuredHeight() && !reviewsActivity.w3().h() && reviewsActivity.w3().g()) {
            reviewsActivity.w3().r(true);
            C0470z c0470z = reviewsActivity.L;
            if (c0470z != null) {
                c0470z.c(true);
            }
            reviewsActivity.v3();
        }
    }

    public static final void B3(View view) {
    }

    public static final void C3(ReviewsActivity reviewsActivity, View view) {
        Object systemService = reviewsActivity.getSystemService("input_method");
        kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
        ((InputMethodManager) systemService).hideSoftInputFromWindow(reviewsActivity.u3().b.getWindowToken(), 0);
        reviewsActivity.u3().b.clearFocus();
        g2.S e4 = g2.S.m.e(reviewsActivity);
        String g4 = e4 != null ? e4.g() : null;
        if (g4 == null || g4.length() == 0) {
            reviewsActivity.M3();
            return;
        }
        Editable text = reviewsActivity.u3().b.getText();
        kotlin.jvm.internal.m.d(text, "getText(...)");
        reviewsActivity.O3(m3.m.u0(text).toString());
    }

    public static final void D3(ReviewsActivity reviewsActivity, Drawable drawable, Drawable drawable2, View view) {
        if (UptodownApp.F.a0()) {
            reviewsActivity.w3().m().setValue(1);
            reviewsActivity.u3().d.setImageDrawable(drawable);
            reviewsActivity.u3().e.setImageDrawable(drawable2);
            reviewsActivity.u3().f.setImageDrawable(drawable2);
            reviewsActivity.u3().g.setImageDrawable(drawable2);
            reviewsActivity.u3().h.setImageDrawable(drawable2);
        }
    }

    public static final void E3(ReviewsActivity reviewsActivity, Drawable drawable, Drawable drawable2, View view) {
        if (UptodownApp.F.a0()) {
            reviewsActivity.w3().m().setValue(2);
            reviewsActivity.u3().d.setImageDrawable(drawable);
            reviewsActivity.u3().e.setImageDrawable(drawable);
            reviewsActivity.u3().f.setImageDrawable(drawable2);
            reviewsActivity.u3().g.setImageDrawable(drawable2);
            reviewsActivity.u3().h.setImageDrawable(drawable2);
        }
    }

    public static final void F3(ReviewsActivity reviewsActivity, Drawable drawable, Drawable drawable2, View view) {
        if (UptodownApp.F.a0()) {
            reviewsActivity.w3().m().setValue(3);
            reviewsActivity.u3().d.setImageDrawable(drawable);
            reviewsActivity.u3().e.setImageDrawable(drawable);
            reviewsActivity.u3().f.setImageDrawable(drawable);
            reviewsActivity.u3().g.setImageDrawable(drawable2);
            reviewsActivity.u3().h.setImageDrawable(drawable2);
        }
    }

    public static final void G3(ReviewsActivity reviewsActivity, Drawable drawable, Drawable drawable2, View view) {
        if (UptodownApp.F.a0()) {
            reviewsActivity.w3().m().setValue(4);
            reviewsActivity.u3().d.setImageDrawable(drawable);
            reviewsActivity.u3().e.setImageDrawable(drawable);
            reviewsActivity.u3().f.setImageDrawable(drawable);
            reviewsActivity.u3().g.setImageDrawable(drawable);
            reviewsActivity.u3().h.setImageDrawable(drawable2);
        }
    }

    public static final void H3(ReviewsActivity reviewsActivity, Drawable drawable, View view) {
        if (UptodownApp.F.a0()) {
            reviewsActivity.w3().m().setValue(5);
            reviewsActivity.u3().d.setImageDrawable(drawable);
            reviewsActivity.u3().e.setImageDrawable(drawable);
            reviewsActivity.u3().f.setImageDrawable(drawable);
            reviewsActivity.u3().g.setImageDrawable(drawable);
            reviewsActivity.u3().h.setImageDrawable(drawable);
        }
    }

    public static final void I3(ReviewsActivity reviewsActivity, View view) {
        if (kotlin.jvm.internal.m.a(reviewsActivity.w3().k().getValue(), "date")) {
            return;
        }
        reviewsActivity.w3().k().setValue("date");
        TextView tvOrderByDateReviews = reviewsActivity.u3().u;
        kotlin.jvm.internal.m.d(tvOrderByDateReviews, "tvOrderByDateReviews");
        w2.v.a(tvOrderByDateReviews);
        reviewsActivity.u3().t.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().t.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.u3().v.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().v.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.N3();
    }

    public static final void J3(ReviewsActivity reviewsActivity, View view) {
        if (kotlin.jvm.internal.m.a(reviewsActivity.w3().k().getValue(), "best")) {
            return;
        }
        reviewsActivity.w3().k().setValue("best");
        TextView tvOrderByBestReviews = reviewsActivity.u3().t;
        kotlin.jvm.internal.m.d(tvOrderByBestReviews, "tvOrderByBestReviews");
        w2.v.a(tvOrderByBestReviews);
        reviewsActivity.u3().u.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().u.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.u3().v.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().v.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.N3();
    }

    public static final void K3(ReviewsActivity reviewsActivity, ActivityResult activityResult) {
        if (activityResult.getResultCode() == 1) {
            g2.S e4 = g2.S.m.e(reviewsActivity);
            if ((e4 != null ? e4.g() : null) == null || !e4.m(reviewsActivity)) {
                return;
            }
            UptodownApp.a aVar = UptodownApp.F;
            aVar.m0(reviewsActivity);
            aVar.l0(reviewsActivity);
            reviewsActivity.O3(reviewsActivity.u3().b.getText().toString());
        }
    }

    public final void L3(ArrayList arrayList) {
        this.L = new C0470z(arrayList, this, this.M);
    }

    private final void M3() {
        this.N.launch(new Intent((Context) this, (Class<?>) LoginActivity.class), UptodownApp.F.b(this));
    }

    private final void N3() {
        u3().o.setAdapter((RecyclerView.Adapter) null);
        this.L = null;
        w3().q(true);
        w3().s(0);
        v3();
    }

    private final void O3(String str) {
        int intValue = ((Number) w3().m().getValue()).intValue();
        if (1 <= intValue && intValue < 6) {
            w3().p(this, str);
            return;
        }
        String string = getString(2131952015);
        kotlin.jvm.internal.m.d(string, "getString(...)");
        r0(string);
    }

    public static final C0619z0 t3(ReviewsActivity reviewsActivity) {
        return C0619z0.c(reviewsActivity.getLayoutInflater());
    }

    public final C0619z0 u3() {
        return (C0619z0) this.J.getValue();
    }

    private final void v3() {
        if (w3().g()) {
            w3().d(this);
        }
    }

    public final G w3() {
        return (G) this.K.getValue();
    }

    private final void x3() {
        Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
        if (drawable != null) {
            u3().p.setNavigationIcon(drawable);
            u3().p.setNavigationContentDescription(getString(2131951721));
        }
        u3().p.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.y3(ReviewsActivity.this, view);
            }
        });
        C1233m c1233m = new C1233m();
        C0955f c0955f = (C0955f) w3().e().getValue();
        if (c1233m.v(c0955f != null ? c0955f.R() : null, this)) {
            u2.I i = u2.I.a;
            C0955f c0955f2 = (C0955f) w3().e().getValue();
            u3().c.setImageDrawable(i.k(this, c0955f2 != null ? c0955f2.R() : null));
        } else {
            com.squareup.picasso.s h4 = com.squareup.picasso.s.h();
            C0955f c0955f3 = (C0955f) w3().e().getValue();
            h4.l(c0955f3 != null ? c0955f3.G() : null).l(2131231321).n(UptodownApp.F.h0(this)).i(u3().c);
        }
        TextView textView = u3().x;
        k.a aVar = N1.k.g;
        textView.setTypeface(aVar.w());
        u3().r.setTypeface(aVar.w());
        TextView textView2 = u3().r;
        C0955f c0955f4 = (C0955f) w3().e().getValue();
        textView2.setText(c0955f4 != null ? c0955f4.M() : null);
        u3().s.setTypeface(aVar.x());
        TextView textView3 = u3().s;
        C0955f c0955f5 = (C0955f) w3().e().getValue();
        textView3.setText(c0955f5 != null ? c0955f5.z0() : null);
        u3().q.setTypeface(aVar.x());
        TextView textView4 = u3().q;
        C0955f c0955f6 = (C0955f) w3().e().getValue();
        textView4.setText(c0955f6 != null ? c0955f6.g() : null);
        u3().b.setTypeface(aVar.x());
        u3().w.setTypeface(aVar.w());
        u3().w.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.C3(ReviewsActivity.this, view);
            }
        });
        final Drawable drawable2 = ContextCompat.getDrawable(this, 2131231525);
        final Drawable drawable3 = ContextCompat.getDrawable(this, 2131231523);
        if (w3().i().getValue() != null) {
            Object value = w3().i().getValue();
            kotlin.jvm.internal.m.b(value);
            if (((g2.L) value).h() >= 1) {
                u3().d.setImageDrawable(drawable2);
            }
            Object value2 = w3().i().getValue();
            kotlin.jvm.internal.m.b(value2);
            if (((g2.L) value2).h() >= 2) {
                u3().e.setImageDrawable(drawable2);
            }
            Object value3 = w3().i().getValue();
            kotlin.jvm.internal.m.b(value3);
            if (((g2.L) value3).h() >= 3) {
                u3().f.setImageDrawable(drawable2);
            }
            Object value4 = w3().i().getValue();
            kotlin.jvm.internal.m.b(value4);
            if (((g2.L) value4).h() >= 4) {
                u3().g.setImageDrawable(drawable2);
            }
            Object value5 = w3().i().getValue();
            kotlin.jvm.internal.m.b(value5);
            if (((g2.L) value5).h() == 5) {
                u3().h.setImageDrawable(drawable2);
            }
            Object value6 = w3().i().getValue();
            kotlin.jvm.internal.m.b(value6);
            String i4 = ((g2.L) value6).i();
            if (i4 != null && i4.length() != 0) {
                EditText editText = u3().b;
                Object value7 = w3().i().getValue();
                kotlin.jvm.internal.m.b(value7);
                editText.setText(String.valueOf(((g2.L) value7).i()));
            }
            u3().w.setText(getString(2131951990));
        }
        u3().d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.D3(ReviewsActivity.this, drawable2, drawable3, view);
            }
        });
        u3().e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.E3(ReviewsActivity.this, drawable2, drawable3, view);
            }
        });
        u3().f.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.F3(ReviewsActivity.this, drawable2, drawable3, view);
            }
        });
        u3().g.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.G3(ReviewsActivity.this, drawable2, drawable3, view);
            }
        });
        u3().h.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.H3(ReviewsActivity.this, drawable2, view);
            }
        });
        u3().u.setTypeface(aVar.w());
        u3().u.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.I3(ReviewsActivity.this, view);
            }
        });
        u3().t.setTypeface(aVar.w());
        u3().t.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.J3(ReviewsActivity.this, view);
            }
        });
        u3().v.setTypeface(aVar.w());
        u3().v.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.z3(ReviewsActivity.this, view);
            }
        });
        u3().o.setLayoutManager(new LinearLayoutManager(this, 1, false));
        int dimension = (int) getResources().getDimension(2131166020);
        u3().o.addItemDecoration(new w2.o(dimension, dimension, dimension, dimension));
        u3().l.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
            public final void onScrollChange(NestedScrollView nestedScrollView, int i5, int i6, int i7, int i8) {
                ReviewsActivity.A3(ReviewsActivity.this, nestedScrollView, i5, i6, i7, i8);
            }
        });
        u3().k.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ReviewsActivity.B3(view);
            }
        });
    }

    public static final void y3(ReviewsActivity reviewsActivity, View view) {
        reviewsActivity.getOnBackPressedDispatcher().onBackPressed();
    }

    public static final void z3(ReviewsActivity reviewsActivity, View view) {
        if (kotlin.jvm.internal.m.a(reviewsActivity.w3().k().getValue(), "most")) {
            return;
        }
        reviewsActivity.w3().k().setValue("most");
        TextView tvOrderByMostReviews = reviewsActivity.u3().v;
        kotlin.jvm.internal.m.d(tvOrderByMostReviews, "tvOrderByMostReviews");
        w2.v.a(tvOrderByMostReviews);
        reviewsActivity.u3().t.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().t.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.u3().u.setBackground(ContextCompat.getDrawable(reviewsActivity, 2131231253));
        reviewsActivity.u3().u.setTextColor(ContextCompat.getColorStateList(reviewsActivity, 2131100626));
        reviewsActivity.N3();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        Bundle extras;
        Parcelable parcelable;
        Object parcelable2;
        Parcelable parcelable3;
        Object parcelable4;
        super.onCreate(bundle);
        setContentView(u3().getRoot());
        Intent intent = getIntent();
        if (intent != null && (extras = intent.getExtras()) != null) {
            if (extras.containsKey("appInfo")) {
                r3.t e4 = w3().e();
                if (Build.VERSION.SDK_INT >= 33) {
                    parcelable4 = extras.getParcelable("appInfo", C0955f.class);
                    parcelable3 = (Parcelable) parcelable4;
                } else {
                    parcelable3 = extras.getParcelable("appInfo");
                }
                kotlin.jvm.internal.m.b(parcelable3);
                e4.setValue(parcelable3);
            }
            if (extras.containsKey("myReview")) {
                r3.t i = w3().i();
                if (Build.VERSION.SDK_INT >= 33) {
                    parcelable2 = extras.getParcelable("myReview", g2.L.class);
                    parcelable = (Parcelable) parcelable2;
                } else {
                    parcelable = extras.getParcelable("myReview");
                }
                i.setValue(parcelable);
                if (w3().i().getValue() != null) {
                    r3.t m = w3().m();
                    Object value = w3().i().getValue();
                    kotlin.jvm.internal.m.b(value);
                    m.setValue(Integer.valueOf(((g2.L) value).h()));
                }
            }
        }
        x3();
        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);
        v3();
    }
}