导航菜单

页面标题

页面副标题

Baubap v3.9.7 - HomeFragment.java 源代码

正在查看: Baubap v3.9.7 应用的 HomeFragment.java JAVA 源代码文件

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


package com.baubap.modules.home.presentation;

import aj.c;
import aj.e;
import aj.e0;
import aj.g0;
import aj.h;
import aj.h0;
import aj.i0;
import aj.j;
import aj.j0;
import aj.l;
import aj.p;
import aj.r;
import aj.s;
import aj.t;
import aj.u;
import aj.v;
import aj.w;
import android.animation.LayoutTransition;
import android.content.Context;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.View;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.compose.ui.platform.ComposeView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.f0;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.d1;
import cg.a0;
import cg.z;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent;
import com.baubap.modules.abcd.presentation.event.AbcdEventsViewModel;
import com.baubap.modules.wrapper.presentation.WrapperViewModel;
import com.baubap.presentation.UserInfoDatadogViewModel;
import com.baubap.presentation.main.MainActivity;
import com.baubap.presentation.main.MainViewModel;
import com.baubap.util.adapter.ProminentLayoutManager;
import com.facebook.shimmer.ShimmerFrameLayout;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.imageview.ShapeableImageView;
import f40.k;
import f6.d0;
import f6.f1;
import f6.l1;
import hw.d;
import j3.z2;
import java.util.ArrayList;
import jh.c0;
import kotlin.jvm.internal.q;
import kotlin.jvm.internal.y;
import l10.b;
import m30.g;
import m40.r0;
import me.u1;
import mo.i;
import mo.o;
import oi.x;
import p40.k1;
import se.f;
import se.l0;
import u8.a3;
import u8.o1;
import vi.n;
import yi.m;
import z50.a;

public final class HomeFragment extends c0 implements d {

    public static final k[] f9444s;

    public l0 f9445h;

    public f f9446i;

    public final i f9447j;

    public final l1 f9448k;

    public final l1 f9449l;

    public final l1 f9450m;

    public final l1 f9451n;

    public final l1 f9452o;

    public final aj.f f9453p;

    public final e f9454q;

    public final aj.f f9455r;

    static {
        q qVar = new q(HomeFragment.class, "binding", "getBinding()Lcom/baubap/databinding/HomeFragmentBinding;", 0);
        y.a.getClass();
        f9444s = new k[]{qVar};
    }

    public HomeFragment() {
        super(2131558608, 16);
        this.f9447j = c0.d.V0(this, c.f1471b);
        x xVar = new x(this, 23);
        g gVar = g.c;
        m30.f e02 = b.e0(gVar, new ah.x(xVar, 10));
        this.f9448k = f40.q.K(this, y.a(HomeViewModel.class), new cg.y(e02, 12), new z(e02, 12), new a0(this, e02, 13));
        this.f9449l = f40.q.K(this, y.a(MainViewModel.class), new x(this, 17), new n(this, 1), new x(this, 18));
        this.f9450m = f40.q.K(this, y.a(AbcdEventsViewModel.class), new x(this, 19), new n(this, 2), new x(this, 20));
        int i10 = 3;
        this.f9451n = f40.q.K(this, y.a(WrapperViewModel.class), new x(this, 21), new n(this, i10), new x(this, 22));
        m30.f e03 = b.e0(gVar, new ah.x(new x(this, 24), 11));
        this.f9452o = f40.q.K(this, y.a(UserInfoDatadogViewModel.class), new cg.y(e03, 13), new z(e03, 13), new a0(this, e03, 12));
        this.f9453p = new aj.f(this, i10);
        this.f9454q = new e(this, 8);
        this.f9455r = new aj.f(this, 0);
    }

    public static final void v0(HomeFragment homeFragment, String str) {
        homeFragment.getClass();
        com.bumptech.glide.c.s2(g0.i.t(new m30.i("screen_type", "HomeFragment_".concat(str))), "referrals");
    }

    public final void A0() {
        u1 w02 = w0();
        ShimmerFrameLayout shimmerFrameLayout = w02.A;
        xu.b.x(shimmerFrameLayout, "shimmerTitleLayout");
        a.b0(shimmerFrameLayout);
        w02.A.startShimmer();
        ShimmerFrameLayout shimmerFrameLayout2 = w02.f21361y;
        xu.b.x(shimmerFrameLayout2, "shimmerProductsLayout");
        a.b0(shimmerFrameLayout2);
        shimmerFrameLayout2.startShimmer();
        ShimmerFrameLayout shimmerFrameLayout3 = w02.f21362z;
        xu.b.x(shimmerFrameLayout3, "shimmerSectionsLayout");
        a.b0(shimmerFrameLayout3);
        shimmerFrameLayout3.startShimmer();
        ShimmerFrameLayout shimmerFrameLayout4 = w02.f21360x;
        xu.b.x(shimmerFrameLayout4, "shimmerBannersLayout");
        a.b0(shimmerFrameLayout4);
        shimmerFrameLayout4.startShimmer();
    }

    public final void e(int i10) {
        w0().f21358v.setEnabled(i10 == 0);
    }

    @Override
    public final void onPause() {
        f0 requireActivity = requireActivity();
        MainActivity mainActivity = requireActivity instanceof MainActivity ? (MainActivity) requireActivity : null;
        if (mainActivity != null) {
            ConstraintLayout a10 = mainActivity.G().f20651b.a();
            xu.b.x(a10, "getRoot(...)");
            a.J(a10);
        }
        ArrayList arrayList = w0().f21339c.i;
        if (arrayList != null) {
            arrayList.remove(this);
        }
        super.onPause();
    }

    @Override
    public final void onResume() {
        super.onResume();
        z0();
        w0().f21339c.a(this);
        f0 requireActivity = requireActivity();
        MainActivity mainActivity = requireActivity instanceof MainActivity ? (MainActivity) requireActivity : null;
        if (mainActivity != null) {
            mainActivity.K(true);
        }
    }

    @Override
    public final void onStart() {
        super.onStart();
        A0();
        f0 requireActivity = requireActivity();
        xu.b.x(requireActivity, "requireActivity(...)");
        a.f0(requireActivity, false);
        mr.b.c0(this, 2131099689, false, 6);
    }

    @Override
    public final void onViewCreated(View view, Bundle bundle) {
        xu.b.y(view, "view");
        Adjust.trackEvent(new AdjustEvent("fd5hmu"));
        u1 w02 = w0();
        ConstraintLayout constraintLayout = w02.f21346j;
        xu.b.x(constraintLayout, "homeContent");
        LayoutTransition layoutTransition = constraintLayout.getLayoutTransition();
        if (layoutTransition == null) {
            layoutTransition = new LayoutTransition();
        }
        layoutTransition.enableTransitionType(4);
        ij.e eVar = new ij.e(new e(this, 6), new e(this, 7));
        RecyclerView recyclerView = w02.f21355s;
        recyclerView.setAdapter(eVar);
        recyclerView.setItemViewCacheSize(4);
        Context requireContext = requireContext();
        xu.b.x(requireContext, "requireContext(...)");
        recyclerView.setLayoutManager(new ProminentLayoutManager(requireContext));
        new d1().a(recyclerView);
        recyclerView.i(new no.b(recyclerView.getResources().getDimensionPixelSize(2131165940)), -1);
        recyclerView.i(new no.a(), -1);
        bj.c cVar = new bj.c(new bj.b());
        RecyclerView recyclerView2 = w02.f21337a;
        recyclerView2.setAdapter(cVar);
        Context requireContext2 = requireContext();
        xu.b.x(requireContext2, "requireContext(...)");
        recyclerView2.i(new no.c(requireContext2), -1);
        int i10 = 1;
        w02.f21359w.setAdapter(new ij.i(new aj.f(this, i10)));
        RecyclerView recyclerView3 = w0().f21345i;
        requireContext();
        int i11 = 0;
        recyclerView3.setLayoutManager(new LinearLayoutManager(0));
        new d1().a(recyclerView3);
        RecyclerView recyclerView4 = w0().f21340d;
        recyclerView4.setAdapter(new cj.c(new e(this, 1)));
        recyclerView4.setItemViewCacheSize(3);
        recyclerView4.i(new no.a(), -1);
        Context requireContext3 = requireContext();
        xu.b.x(requireContext3, "requireContext(...)");
        recyclerView4.setLayoutManager(new ProminentLayoutManager(requireContext3));
        new d1().a(recyclerView4);
        ShapeableImageView shapeableImageView = w02.f21343g.f20553c;
        xu.b.x(shapeableImageView, "imgReferrals");
        o.c(this, shapeableImageView, "https://media.baubap.com/android/referrals/logo_invita_y_gana.png");
        FragmentContainerView fragmentContainerView = w02.f21342f;
        xu.b.x(fragmentContainerView, "cardPayments");
        a.c0(fragmentContainerView, x0().a("services_payments_section_visibility"));
        HomeViewModel y02 = y0();
        mr.b.O(this, y02, true, false);
        a3 N1 = com.bumptech.glide.c.N1(new aj.n(this, null), y02.f31013p);
        d0 viewLifecycleOwner = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner, "getViewLifecycleOwner(...)");
        w4.g.a0(N1, viewLifecycleOwner);
        a3 N12 = com.bumptech.glide.c.N1(new aj.o(this, null), y02.f9458c0);
        d0 viewLifecycleOwner2 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner2, "getViewLifecycleOwner(...)");
        w4.g.a0(N12, viewLifecycleOwner2);
        a3 N13 = com.bumptech.glide.c.N1(new p(this, null), y02.f9464i0);
        d0 viewLifecycleOwner3 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner3, "getViewLifecycleOwner(...)");
        w4.g.a0(N13, viewLifecycleOwner3);
        a3 N14 = com.bumptech.glide.c.N1(new aj.q(this, null), y02.f9460e0);
        d0 viewLifecycleOwner4 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner4, "getViewLifecycleOwner(...)");
        w4.g.a0(N14, viewLifecycleOwner4);
        a3 N15 = com.bumptech.glide.c.N1(new r(this, null), y02.f9462g0);
        d0 viewLifecycleOwner5 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner5, "getViewLifecycleOwner(...)");
        w4.g.a0(N15, viewLifecycleOwner5);
        a3 N16 = com.bumptech.glide.c.N1(new s(this, null), y02.W);
        d0 viewLifecycleOwner6 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner6, "getViewLifecycleOwner(...)");
        w4.g.a0(N16, viewLifecycleOwner6);
        a3 N17 = com.bumptech.glide.c.N1(new t(this, null), y02.U);
        d0 viewLifecycleOwner7 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner7, "getViewLifecycleOwner(...)");
        w4.g.a0(N17, viewLifecycleOwner7);
        a3 N18 = com.bumptech.glide.c.N1(new u(this, null), y02.S);
        d0 viewLifecycleOwner8 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner8, "getViewLifecycleOwner(...)");
        w4.g.a0(N18, viewLifecycleOwner8);
        a3 N19 = com.bumptech.glide.c.N1(new v(this, null), y02.Y);
        d0 viewLifecycleOwner9 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner9, "getViewLifecycleOwner(...)");
        w4.g.a0(N19, viewLifecycleOwner9);
        a3 N110 = com.bumptech.glide.c.N1(new aj.g(this, null), y02.f9456a0);
        d0 viewLifecycleOwner10 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner10, "getViewLifecycleOwner(...)");
        w4.g.a0(N110, viewLifecycleOwner10);
        a3 N111 = com.bumptech.glide.c.N1(new h(this, null), y02.f9466k0);
        d0 viewLifecycleOwner11 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner11, "getViewLifecycleOwner(...)");
        w4.g.a0(N111, viewLifecycleOwner11);
        yi.n nVar = y02.f9476y;
        nVar.getClass();
        com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new h0(y02, null), new p40.f0(com.bumptech.glide.c.i1(new aa.g(new m(nVar, null)), r0.c), new e0(2, y02, null))), f1.Q(y02));
        a3 N112 = com.bumptech.glide.c.N1(new aj.i(this, null), y0().f9468m0);
        d0 viewLifecycleOwner12 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner12, "getViewLifecycleOwner(...)");
        w4.g.a0(N112, viewLifecycleOwner12);
        a3 N113 = com.bumptech.glide.c.N1(new j(this, null), y02.f9470o0);
        d0 viewLifecycleOwner13 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner13, "getViewLifecycleOwner(...)");
        w4.g.a0(N113, viewLifecycleOwner13);
        a3 N114 = com.bumptech.glide.c.N1(new aj.k(this, null), y02.f9472q0);
        d0 viewLifecycleOwner14 = getViewLifecycleOwner();
        xu.b.x(viewLifecycleOwner14, "getViewLifecycleOwner(...)");
        w4.g.a0(N114, viewLifecycleOwner14);
        UserInfoDatadogViewModel userInfoDatadogViewModel = (UserInfoDatadogViewModel) this.f9452o.getValue();
        userInfoDatadogViewModel.getClass();
        tx.b.X(f1.Q(userInfoDatadogViewModel), (q30.j) null, (m40.h0) null, new ul.z(userInfoDatadogViewModel, null), 3);
        boolean a10 = x0().a("isWrapperAvailable");
        l1 l1Var = this.f9451n;
        if (a10) {
            WrapperViewModel wrapperViewModel = (WrapperViewModel) l1Var.getValue();
            mr.b.O(this, wrapperViewModel, true, false);
            a3 N115 = com.bumptech.glide.c.N1(new l(this, null), wrapperViewModel.A);
            d0 viewLifecycleOwner15 = getViewLifecycleOwner();
            xu.b.x(viewLifecycleOwner15, "getViewLifecycleOwner(...)");
            w4.g.a0(N115, viewLifecycleOwner15);
        }
        if (y02.N.f30961b.b()) {
            d0 viewLifecycleOwner16 = getViewLifecycleOwner();
            xu.b.x(viewLifecycleOwner16, "getViewLifecycleOwner(...)");
            tx.b.X(c0.d.u0(viewLifecycleOwner16), (q30.j) null, (m40.h0) null, new aj.m(y02, this, null), 3);
        }
        ComposeView composeView = w0().f21352p;
        composeView.setViewCompositionStrategy(z2.f17545b);
        composeView.setContent(new j2.c(new w(y02, this, i10), true, -130949997));
        u1 w03 = w0();
        w03.f21358v.setOnRefreshListener(new aj.b(i11, w03, this));
        AppCompatTextView appCompatTextView = w03.f21348l;
        xu.b.x(appCompatTextView, "lblAboutBaubap");
        a.Z(appCompatTextView, new e(this, 2));
        AppCompatTextView appCompatTextView2 = w03.f21349m;
        xu.b.x(appCompatTextView2, "lblHowWorkBaubap");
        a.Z(appCompatTextView2, new e(this, 3));
        w03.f21350n.setMovementMethod(LinkMovementMethod.getInstance());
        MaterialButton materialButton = w03.f21341e;
        xu.b.x(materialButton, "btnPaymentExcedent");
        a.Z(materialButton, new e(this, 4));
        LinearLayoutCompat linearLayoutCompat = (LinearLayoutCompat) w0().f21343g.f20557g;
        xu.b.x(linearLayoutCompat, "linearLayoutCompat");
        a.Z(linearLayoutCompat, new e(this, 5));
        w03.f21338b.setOnClickListener(new n8.j(this, 9));
        if (x0().a("isWrapperAvailable")) {
            ((WrapperViewModel) l1Var.getValue()).n();
        }
        f40.q.j0(this, "isClosedWrapper", new y0.j(this, 21));
    }

    public final u1 w0() {
        return (u1) this.f9447j.a(this, f9444s[0]);
    }

    public final f x0() {
        f fVar = this.f9446i;
        if (fVar != null) {
            return fVar;
        }
        xu.b.r0("getConfig");
        throw null;
    }

    public final HomeViewModel y0() {
        return (HomeViewModel) this.f9448k.getValue();
    }

    public final void z0() {
        HomeViewModel y02 = y0();
        u1 w02 = w0();
        RecyclerView recyclerView = w02.f21355s;
        xu.b.x(recyclerView, "products");
        recyclerView.setVisibility(4);
        RecyclerView recyclerView2 = w02.f21359w;
        xu.b.x(recyclerView2, "sections");
        recyclerView2.setVisibility(4);
        RecyclerView recyclerView3 = w02.f21340d;
        xu.b.x(recyclerView3, "banner");
        recyclerView3.setVisibility(4);
        A0();
        oo.d dVar = y02.N.f30961b;
        if (dVar.b()) {
            dVar.a().requestContentCardsRefresh();
        }
        yi.h hVar = y02.C;
        hVar.getClass();
        k1 k1Var = new k1(new aa.g(new yi.g(hVar, null)), hVar.f37670b.a(), new o1(1, hVar, null));
        s40.d dVar2 = r0.c;
        com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new aj.d0(y02, null), new p40.f0(com.bumptech.glide.c.i1(k1Var, dVar2), new zc.g(11, null))), f1.Q(y02));
        yi.l lVar = y02.A;
        lVar.getClass();
        com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new g0(y02, null), new p40.f0(com.bumptech.glide.c.i1(new aa.g(new yi.k(lVar, null)), dVar2), new e0(1, y02, null))), f1.Q(y02));
        tx.b.X(f1.Q(y02), (q30.j) null, (m40.h0) null, new aj.a0(y02, null), 3);
        tx.b.X(f1.Q(y02), (q30.j) null, (m40.h0) null, new aj.c0(y02, null), 3);
        yi.r rVar = y02.f9477z;
        rVar.getClass();
        com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new j0(y02, null), new p40.f0(com.bumptech.glide.c.i1(new aa.g(new yi.q(rVar, null)), dVar2), new zc.g(12, null))), f1.Q(y02));
        yi.j jVar = y02.D;
        jVar.getClass();
        com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new aj.f0(y02, null), new p40.f0(com.bumptech.glide.c.i1(new aa.g(new yi.i(jVar, null)), dVar2), new e0(0, y02, null))), f1.Q(y02));
        if (y02.f9468m0.b.a().isEmpty()) {
            ek.f fVar = y02.E;
            fVar.getClass();
            com.bumptech.glide.c.K1(com.bumptech.glide.c.N1(new i0(y02, null), new p40.f0(com.bumptech.glide.c.i1(new aa.g(new ek.e(fVar, null)), dVar2), new e0(3, y02, null))), f1.Q(y02));
        }
        ul.d dVar3 = y02.N;
        if (dVar3.f30961b.b()) {
            tx.b.X(f1.Q(y02), (q30.j) null, (m40.h0) null, new aj.y(y02, null), 3);
            oo.d dVar4 = dVar3.f30961b;
            if (dVar4.b()) {
                dVar4.a().requestContentCardsRefresh();
            }
        }
    }
}