得物.apk(点击下载) / MallChannelMainActivityV2.java


package com.shizhuang.duapp.modules.mall_dynamic.channel.ui;

import a.f;
import android.os.Bundle;
import android.util.ArrayMap;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.core.view.OneShotPreDrawListener;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModelLazy;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.NormalModuleAdapter;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.ui.BaseActivity;
import com.shizhuang.duapp.common.utils.livebus.PageEventBus;
import com.shizhuang.duapp.libs.bpm.BM;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.libs.smartlayout.DuSmartLayout;
import com.shizhuang.duapp.modules.du_mall_common.api.LoadResultKt;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IMallExposureHelper;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.MallModuleSectionExposureHelper;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.MallModuleSectionExposureHelper$enableChildBoundExposure$1;
import com.shizhuang.duapp.modules.mall_dynamic.channel.commponet.ComponentHelper;
import com.shizhuang.duapp.modules.mall_dynamic.channel.commponet.IChannelMainProvider;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.ChannelToolbarModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.views.BaseChannelView;
import com.shizhuang.duapp.modules.mall_dynamic.channel.views.ChannelToolbarView;
import com.shizhuang.duapp.modules.mall_dynamic.channel.views.IChannelBannerInsetView;
import com.shizhuang.duapp.modules.mall_dynamic.channel.vm.MallChannelMainViewModel;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.nestedceiling.widget.NestedParentRecyclerView;
import df.b0;
import df.r0;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import k60.a;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.ranges.RangesKt___RangesKt;
import o5.i;
import org.jetbrains.annotations.NotNull;
import rd.l;
import us.h;

@Route(extPath = {"/dynamic/ChannelMainPage", "/dynamic/SingleMainPage", "/product/BrandChannelPage"})
@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/ui/MallChannelMainActivityV2;", "Lcom/shizhuang/duapp/common/ui/BaseActivity;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/commponet/IChannelMainProvider;", "<init>", "()V", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: MallChannelMainActivityV2.kt */
public final class MallChannelMainActivityV2 extends BaseActivity implements IChannelMainProvider {
    public static ChangeQuickRedirect changeQuickRedirect;

    /* renamed from: c  reason: collision with root package name */
    public final NormalModuleAdapter f19242c;
    public final Lazy d = new ViewModelLazy(Reflection.getOrCreateKotlinClass(MallChannelMainViewModel.class), new MallChannelMainActivityV2$$special$$inlined$viewModels$2(this), new MallChannelMainActivityV2$$special$$inlined$viewModels$1(this));
    public MallModuleSectionExposureHelper e;
    @NotNull
    public final ComponentHelper f;

    /* renamed from: g  reason: collision with root package name */
    public final a f19243g;

    /* renamed from: h  reason: collision with root package name */
    public HashMap f19244h;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@Nullable MallChannelMainActivityV2 mallChannelMainActivityV2, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{mallChannelMainActivityV2, bundle}, null, changeQuickRedirect, true, 211228, new Class[]{MallChannelMainActivityV2.class, Bundle.class}, Void.TYPE).isSupported) {
                jn.b bVar = jn.b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                MallChannelMainActivityV2.d(mallChannelMainActivityV2, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mallChannelMainActivityV2.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_dynamic.channel.ui.MallChannelMainActivityV2")) {
                    bVar.activityOnCreateMethod(mallChannelMainActivityV2, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(MallChannelMainActivityV2 mallChannelMainActivityV2) {
            if (!PatchProxy.proxy(new Object[]{mallChannelMainActivityV2}, null, changeQuickRedirect, true, 211230, new Class[]{MallChannelMainActivityV2.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                MallChannelMainActivityV2.f(mallChannelMainActivityV2);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mallChannelMainActivityV2.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_dynamic.channel.ui.MallChannelMainActivityV2")) {
                    jn.b.f34396a.activityOnResumeMethod(mallChannelMainActivityV2, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(MallChannelMainActivityV2 mallChannelMainActivityV2) {
            if (!PatchProxy.proxy(new Object[]{mallChannelMainActivityV2}, null, changeQuickRedirect, true, 211229, new Class[]{MallChannelMainActivityV2.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                MallChannelMainActivityV2.e(mallChannelMainActivityV2);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mallChannelMainActivityV2.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_dynamic.channel.ui.MallChannelMainActivityV2")) {
                    jn.b.f34396a.activityOnStartMethod(mallChannelMainActivityV2, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    /* compiled from: MallChannelMainActivityV2.kt */
    public static final class a extends k60.a {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ MallChannelMainActivityV2 e;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public a(MallChannelMainActivityV2 mallChannelMainActivityV2) {
            this.e = mallChannelMainActivityV2;
        }

        @Override // k60.a
        public void k(@org.jetbrains.annotations.Nullable l<? extends Object> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 211232, new Class[]{l.class}, Void.TYPE).isSupported) {
                BM.b mall = BM.mall();
                Pair[] pairArr = new Pair[3];
                pairArr[0] = TuplesKt.to("name", String.valueOf(this.e.g().g()));
                pairArr[1] = TuplesKt.to("errorCode", String.valueOf(lVar != null ? lVar.a() : -1));
                pairArr[2] = TuplesKt.to("errorMsg", String.valueOf(lVar != null ? lVar.c() : null));
                mall.c("mall_channel_main_error", MapsKt__MapsKt.mapOf(pairArr));
            }
        }

        @Override // k60.a
        public void m(@NotNull a.C0525a aVar) {
            if (!PatchProxy.proxy(new Object[]{aVar}, this, changeQuickRedirect, false, 211231, new Class[]{a.C0525a.class}, Void.TYPE).isSupported) {
                super.m(aVar);
                BM.mall().b("mall_channel_main_load", aVar.a(), aVar.f(), MapsKt__MapsKt.mapOf(TuplesKt.to("name", String.valueOf(this.e.g().g())), tf.a.e(aVar, "prepareDuration"), u1.a.h(aVar, "requestDuration"), h.e(aVar, "layoutDuration"), TuplesKt.to("vs", "v2")));
            }
        }
    }

    /* compiled from: MallChannelMainActivityV2.kt */
    public static final class b implements OnRefreshListener {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ MallChannelMainActivityV2 b;

        public b(MallChannelMainActivityV2 mallChannelMainActivityV2) {
            this.b = mallChannelMainActivityV2;
        }

        @Override // com.scwang.smartrefresh.layout.listener.OnRefreshListener
        public final void onRefresh(@NotNull RefreshLayout refreshLayout) {
            if (!PatchProxy.proxy(new Object[]{refreshLayout}, this, changeQuickRedirect, false, 211242, new Class[]{RefreshLayout.class}, Void.TYPE).isSupported) {
                this.b.g().fetchData(true);
            }
        }
    }

    /* compiled from: View.kt */
    public static final class c implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ View b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ MallChannelMainActivityV2 f19245c;

        public c(View view, MallChannelMainActivityV2 mallChannelMainActivityV2) {
            this.b = view;
            this.f19245c = mallChannelMainActivityV2;
        }

        public final void run() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211243, new Class[0], Void.TYPE).isSupported) {
                this.f19245c.g().j().setValue(Integer.valueOf(((ChannelToolbarView) this.f19245c._$_findCachedViewById(R.id.toolbarView)).getMeasuredHeight()));
                this.f19245c.i();
            }
        }
    }

    /* compiled from: MallChannelMainActivityV2.kt */
    public static final class d extends nc.a {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public d(MallChannelMainActivityV2 mallChannelMainActivityV2) {
        }

        @Override // com.shizhuang.duapp.common.component.module.IModuleCallback, nc.a
        public void onViewCreated(@NotNull ViewGroup viewGroup, @NotNull View view, int i) {
            if (!PatchProxy.proxy(new Object[]{viewGroup, view, new Integer(i)}, this, changeQuickRedirect, false, 211244, new Class[]{ViewGroup.class, View.class, Integer.TYPE}, Void.TYPE).isSupported) {
                super.onViewCreated(viewGroup, view, i);
                if (view instanceof BaseChannelView) {
                    ((BaseChannelView) view).setViewPageId(0);
                }
            }
        }
    }

    public MallChannelMainActivityV2() {
        NormalModuleAdapter normalModuleAdapter = new NormalModuleAdapter(false, 1);
        this.f19242c = normalModuleAdapter;
        new MallChannelMainActivityV2$qsnObservce$1(this, this, 15, 14);
        this.f = new ComponentHelper(normalModuleAdapter);
        this.f19243g = new a(this);
    }

    public static void d(MallChannelMainActivityV2 mallChannelMainActivityV2, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, mallChannelMainActivityV2, changeQuickRedirect, false, 211204, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            mallChannelMainActivityV2.f19243g.d();
            super.onCreate(bundle);
        }
    }

    public static void e(MallChannelMainActivityV2 mallChannelMainActivityV2) {
        if (!PatchProxy.proxy(new Object[0], mallChannelMainActivityV2, changeQuickRedirect, false, 211216, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
            lr0.a.f35206a.a("onStart...");
        }
    }

    public static void f(MallChannelMainActivityV2 mallChannelMainActivityV2) {
        if (!PatchProxy.proxy(new Object[0], mallChannelMainActivityV2, changeQuickRedirect, false, 211218, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            lr0.a aVar = lr0.a.f35206a;
            aVar.h(mallChannelMainActivityV2.g().g());
            aVar.a("onResume...");
        }
    }

    public View _$_findCachedViewById(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 211224, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.f19244h == null) {
            this.f19244h = new HashMap();
        }
        View view = (View) this.f19244h.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.f19244h.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final MallChannelMainViewModel g() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211200, new Class[0], MallChannelMainViewModel.class);
        return (MallChannelMainViewModel) (proxy.isSupported ? proxy.result : this.d.getValue());
    }

    @Override // com.shizhuang.duapp.modules.mall_dynamic.channel.commponet.IChannelMainProvider
    @NotNull
    public ComponentHelper getComponentHelper() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211201, new Class[0], ComponentHelper.class);
        return proxy.isSupported ? (ComponentHelper) proxy.result : this.f;
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211205, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_mall_channel_main_v2;
    }

    @Override // com.shizhuang.duapp.modules.mall_dynamic.channel.commponet.IChannelMainProvider
    public int getToolbarHeight() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211202, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : ((ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView)).getHeight();
    }

    public final void h(RecyclerView recyclerView) {
        float f12;
        boolean z;
        View childAt;
        if (!PatchProxy.proxy(new Object[]{recyclerView}, this, changeQuickRedirect, false, 211212, new Class[]{RecyclerView.class}, Void.TYPE).isSupported) {
            float f13 = 1.0f;
            if (!g().k() || (childAt = recyclerView.getChildAt(0)) == null || recyclerView.getChildLayoutPosition(childAt) != 0) {
                f12 = 1.0f;
            } else {
                int bottomInset = childAt instanceof IChannelBannerInsetView ? ((IChannelBannerInsetView) childAt).getBottomInset() : 0;
                int height = (childAt.getHeight() - bottomInset) - ((ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView)).getHeight();
                f12 = RangesKt___RangesKt.coerceAtMost(RangesKt___RangesKt.coerceAtLeast(Math.abs(((float) 1) - (height > 0 ? ((float) ((childAt.getBottom() - bottomInset) - ((ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView)).getHeight())) / ((float) height) : i.f36333a)), (float) i.f36333a), 1.0f);
            }
            ChannelToolbarView channelToolbarView = (ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView);
            MallChannelMainViewModel g3 = g();
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], g3, MallChannelMainViewModel.changeQuickRedirect, false, 212302, new Class[0], Boolean.TYPE);
            if (proxy.isSupported) {
                z = ((Boolean) proxy.result).booleanValue();
            } else {
                z = LoadResultKt.e((b50.b) g3.getPageResult().getValue());
            }
            if (z) {
                f13 = f12;
            }
            if (!PatchProxy.proxy(new Object[]{new Float(f13)}, channelToolbarView, ChannelToolbarView.changeQuickRedirect, false, 211931, new Class[]{Float.TYPE}, Void.TYPE).isSupported) {
                channelToolbarView.a(f13, false);
            }
        }
    }

    public final void i() {
        int i = 0;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211213, new Class[0], Void.TYPE).isSupported) {
            boolean k = g().k();
            int measuredHeight = ((ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView)).getMeasuredHeight();
            DuSmartLayout duSmartLayout = (DuSmartLayout) _$_findCachedViewById(R.id.smartLayout);
            ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) duSmartLayout.getLayoutParams();
            marginLayoutParams.topMargin = k ? 0 : measuredHeight;
            duSmartLayout.setLayoutParams(marginLayoutParams);
            NestedParentRecyclerView nestedParentRecyclerView = (NestedParentRecyclerView) _$_findCachedViewById(R.id.recyclerView);
            if (k) {
                i = measuredHeight;
            }
            nestedParentRecyclerView.setTopOffset(i);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        LiveData<ChannelToolbarModel> liveData;
        LiveData<Boolean> liveData2;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211211, new Class[0], Void.TYPE).isSupported) {
            this.f19243g.j();
            LoadResultKt.i(g().getPageResult(), this, new MallChannelMainActivityV2$initData$3(this), new MallChannelMainActivityV2$initData$1(this), new MallChannelMainActivityV2$initData$2(this));
            LoadResultKt.j(g().getLoadStatus(), this, null, new MallChannelMainActivityV2$initData$4(this), 2);
            g().a().observe(this, new MallChannelMainActivityV2$initData$5(this));
            MallChannelMainViewModel g3 = g();
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], g3, MallChannelMainViewModel.changeQuickRedirect, false, 212299, new Class[0], LiveData.class);
            if (proxy.isSupported) {
                liveData = (LiveData) proxy.result;
            } else {
                liveData = g3.f19404h;
            }
            liveData.observe(this, new MallChannelMainActivityV2$initData$6(this));
            g().c().observe(this, new MallChannelMainActivityV2$initData$7(this));
            MallChannelMainViewModel g6 = g();
            PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], g6, MallChannelMainViewModel.changeQuickRedirect, false, 212303, new Class[0], LiveData.class);
            if (proxy2.isSupported) {
                liveData2 = (LiveData) proxy2.result;
            } else {
                liveData2 = g6.k;
            }
            liveData2.observe(this, new MallChannelMainActivityV2$initData$8(this));
            ((DuSmartLayout) _$_findCachedViewById(R.id.smartLayout)).setOnRefreshListener(new b(this));
            ((DuSmartLayout) _$_findCachedViewById(R.id.smartLayout)).setEnableRefresh(false);
            ((DuSmartLayout) _$_findCachedViewById(R.id.smartLayout)).setEnableLoadMore(false);
            PageEventBus.h(this).a(kr0.c.class).observe(this, new MallChannelMainActivityV2$initData$10(this));
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initStatusBar() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211206, new Class[0], Void.TYPE).isSupported) {
            r0.B(this);
            r0.z(this, null);
            r0.j((ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView));
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
        boolean z = true;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 211210, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            ((NestedParentRecyclerView) _$_findCachedViewById(R.id.recyclerView)).setAdapter(this.f19242c);
            ((NestedParentRecyclerView) _$_findCachedViewById(R.id.recyclerView)).setLayoutManager(this.f19242c.getGridLayoutManager(this));
            this.f19242c.setModuleCallback(new d(this));
            MallModuleSectionExposureHelper mallModuleSectionExposureHelper = new MallModuleSectionExposureHelper(this, (NestedParentRecyclerView) _$_findCachedViewById(R.id.recyclerView), this.f19242c);
            this.e = mallModuleSectionExposureHelper;
            IMallExposureHelper.a.b(mallModuleSectionExposureHelper, "ChannelMain", false, 2, null);
            MallModuleSectionExposureHelper mallModuleSectionExposureHelper2 = this.e;
            if (mallModuleSectionExposureHelper2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("exposureHelper");
            }
            Object[] objArr = {new Byte((byte) 1)};
            ChangeQuickRedirect changeQuickRedirect2 = MallModuleSectionExposureHelper.changeQuickRedirect;
            Class cls = Boolean.TYPE;
            if (!PatchProxy.proxy(objArr, mallModuleSectionExposureHelper2, changeQuickRedirect2, false, 126001, new Class[]{cls}, Void.TYPE).isSupported) {
                mallModuleSectionExposureHelper2.a().f(MallModuleSectionExposureHelper$enableChildBoundExposure$1.INSTANCE);
            }
            MallModuleSectionExposureHelper mallModuleSectionExposureHelper3 = this.e;
            if (mallModuleSectionExposureHelper3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("exposureHelper");
            }
            IMallExposureHelper.a.c(mallModuleSectionExposureHelper3, null, new MallChannelMainActivityV2$initView$2(this), null, null, 13, null);
            MallModuleSectionExposureHelper mallModuleSectionExposureHelper4 = this.e;
            if (mallModuleSectionExposureHelper4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("exposureHelper");
            }
            mallModuleSectionExposureHelper4.i();
            ViewExtensionKt.q((NestedParentRecyclerView) _$_findCachedViewById(R.id.recyclerView), new MallChannelMainActivityV2$initView$3(this));
            ChannelToolbarView channelToolbarView = (ChannelToolbarView) _$_findCachedViewById(R.id.toolbarView);
            OneShotPreDrawListener.add(channelToolbarView, new c(channelToolbarView, this));
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211223, new Class[0], Void.TYPE).isSupported) {
                MallChannelMainViewModel.a h12 = g().h();
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], h12, MallChannelMainViewModel.a.changeQuickRedirect, false, 212318, new Class[0], cls);
                if (proxy.isSupported) {
                    z = ((Boolean) proxy.result).booleanValue();
                } else if (h12.f19405a != 10) {
                    z = false;
                }
                if (z && ServiceManager.s().isUserLogin()) {
                    String j = androidx.appcompat.widget.a.j(f.h("trend_channel_tip_"));
                    if (((Boolean) b0.f(j, Boolean.TRUE)).booleanValue()) {
                        ((DuRequestOptions) mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/bg_mall_channel_trend_dialog.webp").G((LifecycleOwner) getContext()).u(new MallChannelMainActivityV2$showTrendChannelDialog$1(this, j))).y();
                    }
                }
            }
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 211203, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void onCreateViewBefore(@org.jetbrains.annotations.Nullable Bundle bundle) {
        ConcurrentHashMap<String, Type> concurrentHashMap;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 211207, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreateViewBefore(bundle);
            MallChannelMainViewModel g3 = g();
            ComponentHelper componentHelper = getComponentHelper();
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], componentHelper, ComponentHelper.changeQuickRedirect, false, 209387, new Class[0], ConcurrentHashMap.class);
            if (proxy.isSupported) {
                concurrentHashMap = (ConcurrentHashMap) proxy.result;
            } else {
                concurrentHashMap = componentHelper.f19226a;
            }
            g3.e(concurrentHashMap);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211221, new Class[0], Void.TYPE).isSupported) {
            super.onDestroy();
        }
    }

    @Override // com.shizhuang.duapp.modules.mall_dynamic.channel.commponet.IChannelMainProvider
    public void onListScrolled(@NotNull RecyclerView recyclerView) {
        if (!PatchProxy.proxy(new Object[]{recyclerView}, this, changeQuickRedirect, false, 211214, new Class[]{RecyclerView.class}, Void.TYPE).isSupported) {
            h(recyclerView);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void onNetErrorRetryClick() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211222, new Class[0], Void.TYPE).isSupported) {
            g().fetchData(false);
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onPause() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211219, new Class[0], Void.TYPE).isSupported) {
            super.onPause();
            lr0.a aVar = lr0.a.f35206a;
            aVar.a("onPause...");
            long g3 = g().g();
            float remainTime = ((float) getRemainTime()) / 1000.0f;
            if (!PatchProxy.proxy(new Object[]{new Long(g3), new Float(remainTime)}, aVar, lr0.a.changeQuickRedirect, false, 211309, new Class[]{Long.TYPE, Float.TYPE}, Void.TYPE).isSupported) {
                i60.b bVar = i60.b.f33293a;
                ArrayMap arrayMap = new ArrayMap(8);
                arrayMap.put("trade_channel_type", Long.valueOf(g3));
                arrayMap.put("view_duration", Float.valueOf(remainTime));
                bVar.b("trade_common_duration_pageview", "595", "", arrayMap);
            }
        }
    }

    public void onRestoreInstanceState(@NotNull Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 211208, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onRestoreInstanceState(bundle);
            lr0.a.f35206a.a("onRestoreInstanceState...");
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211217, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onSaveInstanceState(@NotNull Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 211209, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onSaveInstanceState(bundle);
            lr0.a.f35206a.a("onSaveInstanceState...");
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211215, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStop() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211220, new Class[0], Void.TYPE).isSupported) {
            super.onStop();
            lr0.a.f35206a.a("onStop...");
        }
    }
}