得物.apk(点击下载) / LiveSeckillListFragment.java
package com.shizhuang.duapp.modules.live.common.product.list;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
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.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.ViewModelLifecycleAwareLazy;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateAdapter;
import com.shizhuang.duapp.common.recyclerview.manager.DuVirtualLayoutManager;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.live.common.adapter.LiveSeckillAdapter;
import com.shizhuang.duapp.modules.live.common.model.live.KolModel;
import com.shizhuang.duapp.modules.live.common.model.live.LiveRoom;
import fi.b;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import ko0.a;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import o5.i;
import org.jetbrains.annotations.NotNull;
import wo0.h;
import wo0.j;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/modules/live/common/product/list/LiveSeckillListFragment;", "Lcom/shizhuang/duapp/common/dialog/sheet/BaseBottomSheetDialogFragment;", "<init>", "()V", "a", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: LiveSeckillListFragment.kt */
public final class LiveSeckillListFragment extends BaseBottomSheetDialogFragment {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public static final a l = new a(null);
public final int f = b.b;
/* renamed from: g reason: collision with root package name */
public DuDelegateAdapter f18578g;
/* renamed from: h reason: collision with root package name */
public LiveSeckillAdapter f18579h;
public final Lazy i = new ViewModelLifecycleAwareLazy(this, new LiveSeckillListFragment$$special$$inlined$duViewModel$1(this));
public boolean j;
public HashMap k;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(LiveSeckillListFragment liveSeckillListFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{liveSeckillListFragment, bundle}, null, changeQuickRedirect, true, 201089, new Class[]{LiveSeckillListFragment.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
LiveSeckillListFragment.r(liveSeckillListFragment, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (liveSeckillListFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.live.common.product.list.LiveSeckillListFragment")) {
jn.b.f34396a.fragmentOnCreateMethod(liveSeckillListFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull LiveSeckillListFragment liveSeckillListFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{liveSeckillListFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 201091, new Class[]{LiveSeckillListFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View t = LiveSeckillListFragment.t(liveSeckillListFragment, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (liveSeckillListFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.live.common.product.list.LiveSeckillListFragment")) {
jn.b.f34396a.fragmentOnCreateViewMethod(liveSeckillListFragment, currentTimeMillis, currentTimeMillis2);
}
return t;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(LiveSeckillListFragment liveSeckillListFragment) {
if (!PatchProxy.proxy(new Object[]{liveSeckillListFragment}, null, changeQuickRedirect, true, 201092, new Class[]{LiveSeckillListFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
LiveSeckillListFragment.u(liveSeckillListFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (liveSeckillListFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.live.common.product.list.LiveSeckillListFragment")) {
jn.b.f34396a.fragmentOnResumeMethod(liveSeckillListFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(LiveSeckillListFragment liveSeckillListFragment) {
if (!PatchProxy.proxy(new Object[]{liveSeckillListFragment}, null, changeQuickRedirect, true, 201090, new Class[]{LiveSeckillListFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
LiveSeckillListFragment.s(liveSeckillListFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (liveSeckillListFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.live.common.product.list.LiveSeckillListFragment")) {
jn.b.f34396a.fragmentOnStartMethod(liveSeckillListFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull LiveSeckillListFragment liveSeckillListFragment, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{liveSeckillListFragment, view, bundle}, null, changeQuickRedirect, true, 201093, new Class[]{LiveSeckillListFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
LiveSeckillListFragment.v(liveSeckillListFragment, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (liveSeckillListFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.live.common.product.list.LiveSeckillListFragment")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(liveSeckillListFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: LiveSeckillListFragment.kt */
public static final class a {
public static ChangeQuickRedirect changeQuickRedirect;
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
@NotNull
public final LiveSeckillListFragment a(@NotNull LiveRoom liveRoom, boolean z) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{liveRoom, new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 201088, new Class[]{LiveRoom.class, Boolean.TYPE}, LiveSeckillListFragment.class);
if (proxy.isSupported) {
return (LiveSeckillListFragment) proxy.result;
}
LiveSeckillListFragment liveSeckillListFragment = new LiveSeckillListFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("liveRoom", liveRoom);
bundle.putBoolean("is_anchor", z);
Unit unit = Unit.INSTANCE;
liveSeckillListFragment.setArguments(bundle);
return liveSeckillListFragment;
}
}
public static void r(LiveSeckillListFragment liveSeckillListFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, liveSeckillListFragment, changeQuickRedirect, false, 201078, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void s(LiveSeckillListFragment liveSeckillListFragment) {
if (!PatchProxy.proxy(new Object[0], liveSeckillListFragment, changeQuickRedirect, false, 201080, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View t(LiveSeckillListFragment liveSeckillListFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, liveSeckillListFragment, changeQuickRedirect, false, 201082, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void u(LiveSeckillListFragment liveSeckillListFragment) {
if (!PatchProxy.proxy(new Object[0], liveSeckillListFragment, changeQuickRedirect, false, 201084, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void v(LiveSeckillListFragment liveSeckillListFragment, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, liveSeckillListFragment, changeQuickRedirect, false, 201086, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 201075, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.k == null) {
this.k = new HashMap();
}
View view = (View) this.k.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i3);
this.k.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment
public int g() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201067, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_live_seckill_list;
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment
public int h() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201069, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.f;
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment
public int i() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201068, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : e();
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment
public float j() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201070, new Class[0], Float.TYPE);
return proxy.isSupported ? ((Float) proxy.result).floatValue() : i.f36333a;
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment
public void k(@org.jetbrains.annotations.Nullable View view) {
KolModel kolModel;
SimpleDateFormat simpleDateFormat;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 201072, new Class[]{View.class}, Void.TYPE).isSupported) {
Bundle arguments = getArguments();
Long l12 = null;
LiveRoom liveRoom = arguments != null ? (LiveRoom) arguments.getParcelable("liveRoom") : null;
if (liveRoom == null) {
dismissAllowingStateLoss();
return;
}
Bundle arguments2 = getArguments();
this.j = arguments2 != null ? arguments2.getBoolean("is_anchor") : false;
LiveSeckillListViewModel w = w();
if (!PatchProxy.proxy(new Object[]{liveRoom}, w, LiveSeckillListViewModel.changeQuickRedirect, false, 201112, new Class[]{LiveRoom.class}, Void.TYPE).isSupported) {
w.b = liveRoom;
}
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setVisibility(8);
((LinearLayout) _$_findCachedViewById(R.id.rlAddNo)).setVisibility(8);
DuVirtualLayoutManager duVirtualLayoutManager = new DuVirtualLayoutManager(requireContext(), 0, false, 6);
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setLayoutManager(duVirtualLayoutManager);
this.f18578g = new DuDelegateAdapter(duVirtualLayoutManager);
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201073, new Class[0], Void.TYPE).isSupported) {
h hVar = new h(this, this);
LiveSeckillListViewModel w4 = w();
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], w4, LiveSeckillListViewModel.changeQuickRedirect, false, 201114, new Class[0], SimpleDateFormat.class);
if (proxy.isSupported) {
simpleDateFormat = (SimpleDateFormat) proxy.result;
} else {
simpleDateFormat = w4.d;
}
LiveSeckillAdapter liveSeckillAdapter = new LiveSeckillAdapter(hVar, simpleDateFormat, this.j);
this.f18579h = liveSeckillAdapter;
liveSeckillAdapter.uploadSensorExposure(true);
DuDelegateAdapter duDelegateAdapter = this.f18578g;
if (duDelegateAdapter != null) {
duDelegateAdapter.addAdapter(this.f18579h);
}
DuDelegateAdapter duDelegateAdapter2 = this.f18578g;
if (duDelegateAdapter2 != null) {
duDelegateAdapter2.uploadSensorExposure(true);
}
DuDelegateAdapter duDelegateAdapter3 = this.f18578g;
if (duDelegateAdapter3 != null) {
duDelegateAdapter3.setExposureHelper(new DuExposureHelper(this, null, false, 6), null);
}
}
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setAdapter(this.f18578g);
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201074, new Class[0], Void.TYPE).isSupported) {
w().a().observe(getViewLifecycleOwner(), new LiveSeckillListFragment$getData$1(this));
LiveSeckillListViewModel w12 = w();
if (!PatchProxy.proxy(new Object[]{this}, w12, LiveSeckillListViewModel.changeQuickRedirect, false, 201118, new Class[]{Fragment.class}, Void.TYPE).isSupported) {
a.C0536a aVar = ko0.a.f34777a;
LiveRoom liveRoom2 = w12.b;
String valueOf = String.valueOf(liveRoom2 != null ? Integer.valueOf(liveRoom2.streamLogId) : null);
LiveRoom liveRoom3 = w12.b;
if (!(liveRoom3 == null || (kolModel = liveRoom3.kol) == null)) {
l12 = Long.valueOf(kolModel.kolId);
}
aVar.n(valueOf, String.valueOf(l12), new wo0.i(w12, this, this));
}
}
LiveSeckillListViewModel w13 = w();
if (!PatchProxy.proxy(new Object[0], w13, LiveSeckillListViewModel.changeQuickRedirect, false, 201117, new Class[0], Void.TYPE).isSupported) {
w13.getLifecycle().addObserver(new LiveSeckillListViewModel$init$1(w13));
w13.e.c(new j(w13), 1, 1, TimeUnit.SECONDS);
mq0.b.f35739a.d("community_live_bargains_exposure", "9", "1115", LiveSeckillListViewModel$init$3.INSTANCE);
}
w().b().observe(getViewLifecycleOwner(), new LiveSeckillListFragment$initView$1(this));
((DuImageLoaderView) _$_findCachedViewById(R.id.seckillTitleView)).i("https://apk.poizon.com/duApp/Android_Config/live/img/bg_seckill_title.jpg").y().x();
}
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, com.google.android.material.bottomsheet.BottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 201077, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, com.google.android.material.bottomsheet.BottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 201081, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public void onDestroyView() {
HashMap hashMap;
super.onDestroyView();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201076, new Class[0], Void.TYPE).isSupported && (hashMap = this.k) != null) {
hashMap.clear();
}
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, com.google.android.material.bottomsheet.BottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201083, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, com.google.android.material.bottomsheet.BottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201079, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.dialog.sheet.BaseBottomSheetDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, com.google.android.material.bottomsheet.BottomSheetDialogFragment, androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 201085, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
public final LiveSeckillListViewModel w() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 201071, new Class[0], LiveSeckillListViewModel.class);
return (LiveSeckillListViewModel) (proxy.isSupported ? proxy.result : this.i.getValue());
}
}