得物.apk(点击下载) / PublishBusinessSelectedBrandFragment.java
package com.shizhuang.duapp.modules.publish.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.recyclerview.widget.RecyclerView;
import co.c;
import co.d;
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.component.recyclerview.LinearItemDecoration;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateInnerAdapter;
import com.shizhuang.duapp.common.recyclerview.holder.DuViewHolder;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.publish.model.brand.BrandSearchItemModel;
import com.shizhuang.duapp.modules.publish.viewmodel.PublishBusinessCooperationViewModel;
import fi.b;
import java.util.HashMap;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import o5.i;
import org.jetbrains.annotations.NotNull;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001:\u0002\u0004\u0005B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0006"}, d2 = {"Lcom/shizhuang/duapp/modules/publish/fragment/PublishBusinessSelectedBrandFragment;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "<init>", "()V", "a", "PublishBusinessSelectedBrandAdapter", "du_media_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: PublishBusinessSelectedBrandFragment.kt */
public final class PublishBusinessSelectedBrandFragment extends BaseFragment {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public static final a e = new a(null);
public PublishBusinessSelectedBrandAdapter b;
/* renamed from: c reason: collision with root package name */
public final Lazy f24406c = FragmentViewModelLazyKt.createViewModelLazy(this, Reflection.getOrCreateKotlinClass(PublishBusinessCooperationViewModel.class), new PublishBusinessSelectedBrandFragment$$special$$inlined$activityViewModels$1(this), new PublishBusinessSelectedBrandFragment$$special$$inlined$activityViewModels$2(this));
public HashMap d;
@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/publish/fragment/PublishBusinessSelectedBrandFragment$PublishBusinessSelectedBrandAdapter;", "Lcom/shizhuang/duapp/common/recyclerview/adapter/DuDelegateInnerAdapter;", "Lcom/shizhuang/duapp/modules/publish/model/brand/BrandSearchItemModel;", "SelectedBrandViewHolder", "du_media_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: PublishBusinessSelectedBrandFragment.kt */
public static final class PublishBusinessSelectedBrandAdapter extends DuDelegateInnerAdapter<BrandSearchItemModel> {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public final Function3<View, Integer, BrandSearchItemModel, Unit> l;
@Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/publish/fragment/PublishBusinessSelectedBrandFragment$PublishBusinessSelectedBrandAdapter$SelectedBrandViewHolder;", "Lcom/shizhuang/duapp/common/recyclerview/holder/DuViewHolder;", "Lcom/shizhuang/duapp/modules/publish/model/brand/BrandSearchItemModel;", "du_media_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: PublishBusinessSelectedBrandFragment.kt */
public final class SelectedBrandViewHolder extends DuViewHolder<BrandSearchItemModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public int b;
/* renamed from: c reason: collision with root package name */
public int f24407c;
public float d = ((float) b.b((float) 1));
public HashMap f;
public SelectedBrandViewHolder(@NotNull View view) {
super(view);
int b2 = b.b(34.0f);
this.b = b2;
this.f24407c = b2;
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 306200, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f == null) {
this.f = new HashMap();
}
View view = (View) this.f.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View containerView = getContainerView();
if (containerView == null) {
return null;
}
View findViewById = containerView.findViewById(i);
this.f.put(Integer.valueOf(i), findViewById);
return findViewById;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, int] */
@Override // com.shizhuang.duapp.common.recyclerview.holder.DuViewHolder
public void onBind(BrandSearchItemModel brandSearchItemModel, int i) {
c cVar;
BrandSearchItemModel brandSearchItemModel2 = brandSearchItemModel;
boolean z = false;
if (!PatchProxy.proxy(new Object[]{brandSearchItemModel2, new Integer(i)}, this, changeQuickRedirect, false, 306199, new Class[]{BrandSearchItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
((TextView) _$_findCachedViewById(R.id.tvName)).setText(brandSearchItemModel2.getTagName());
String icon = brandSearchItemModel2.getIcon();
if (icon == null || icon.length() == 0) {
z = true;
}
if (z) {
cVar = ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBrand)).i("https://cdn.poizon.com/node-common/48cb35a450822bae2df5643b99ba8442.png");
} else {
cVar = ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBrand)).i(brandSearchItemModel2.getIcon());
}
((c) c.a0(cVar, this.d, i.f36333a, i.f36333a, i.f36333a, 14, null).p0(DuScaleType.CENTER_INSIDE).v(new d(this.b, this.f24407c))).x();
((ImageView) _$_findCachedViewById(R.id.ivDelete)).setOnClickListener(new PublishBusinessSelectedBrandFragment$PublishBusinessSelectedBrandAdapter$SelectedBrandViewHolder$onBind$2(this, i, brandSearchItemModel2));
}
}
}
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kotlin.jvm.functions.Function3<? super android.view.View, ? super java.lang.Integer, ? super com.shizhuang.duapp.modules.publish.model.brand.BrandSearchItemModel, kotlin.Unit> */
/* JADX WARN: Multi-variable type inference failed */
public PublishBusinessSelectedBrandAdapter(@NotNull Function3<? super View, ? super Integer, ? super BrandSearchItemModel, Unit> function3) {
this.l = function3;
}
@Override // com.shizhuang.duapp.common.recyclerview.adapter.AdapterLoader, com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateInnerAdapter
@NotNull
public DuViewHolder<BrandSearchItemModel> onViewHolderCreate(@NotNull ViewGroup viewGroup, int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{viewGroup, new Integer(i)}, this, changeQuickRedirect, false, 306197, new Class[]{ViewGroup.class, Integer.TYPE}, DuViewHolder.class);
if (proxy.isSupported) {
return (DuViewHolder) proxy.result;
}
return new SelectedBrandViewHolder(ViewExtensionKt.w(viewGroup, R.layout.du_trend_item_publish_business_selected_brand, false, 2));
}
}
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(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{publishBusinessSelectedBrandFragment, bundle}, null, changeQuickRedirect, true, 306203, new Class[]{PublishBusinessSelectedBrandFragment.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PublishBusinessSelectedBrandFragment.c(publishBusinessSelectedBrandFragment, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (publishBusinessSelectedBrandFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.publish.fragment.PublishBusinessSelectedBrandFragment")) {
jn.b.f34396a.fragmentOnCreateMethod(publishBusinessSelectedBrandFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{publishBusinessSelectedBrandFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 306205, new Class[]{PublishBusinessSelectedBrandFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View e = PublishBusinessSelectedBrandFragment.e(publishBusinessSelectedBrandFragment, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (publishBusinessSelectedBrandFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.publish.fragment.PublishBusinessSelectedBrandFragment")) {
jn.b.f34396a.fragmentOnCreateViewMethod(publishBusinessSelectedBrandFragment, currentTimeMillis, currentTimeMillis2);
}
return e;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment) {
if (!PatchProxy.proxy(new Object[]{publishBusinessSelectedBrandFragment}, null, changeQuickRedirect, true, 306206, new Class[]{PublishBusinessSelectedBrandFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PublishBusinessSelectedBrandFragment.f(publishBusinessSelectedBrandFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (publishBusinessSelectedBrandFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.publish.fragment.PublishBusinessSelectedBrandFragment")) {
jn.b.f34396a.fragmentOnResumeMethod(publishBusinessSelectedBrandFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment) {
if (!PatchProxy.proxy(new Object[]{publishBusinessSelectedBrandFragment}, null, changeQuickRedirect, true, 306204, new Class[]{PublishBusinessSelectedBrandFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PublishBusinessSelectedBrandFragment.d(publishBusinessSelectedBrandFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (publishBusinessSelectedBrandFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.publish.fragment.PublishBusinessSelectedBrandFragment")) {
jn.b.f34396a.fragmentOnStartMethod(publishBusinessSelectedBrandFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{publishBusinessSelectedBrandFragment, view, bundle}, null, changeQuickRedirect, true, 306207, new Class[]{PublishBusinessSelectedBrandFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
PublishBusinessSelectedBrandFragment.g(publishBusinessSelectedBrandFragment, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (publishBusinessSelectedBrandFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.publish.fragment.PublishBusinessSelectedBrandFragment")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(publishBusinessSelectedBrandFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: PublishBusinessSelectedBrandFragment.kt */
public static final class a {
public static ChangeQuickRedirect changeQuickRedirect;
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
}
public static void c(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, publishBusinessSelectedBrandFragment, changeQuickRedirect, false, 306185, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void d(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment) {
if (!PatchProxy.proxy(new Object[0], publishBusinessSelectedBrandFragment, changeQuickRedirect, false, 306187, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View e(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, publishBusinessSelectedBrandFragment, changeQuickRedirect, false, 306189, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void f(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment) {
if (!PatchProxy.proxy(new Object[0], publishBusinessSelectedBrandFragment, changeQuickRedirect, false, 306191, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void g(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, publishBusinessSelectedBrandFragment, changeQuickRedirect, false, 306193, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public static final /* synthetic */ PublishBusinessSelectedBrandAdapter h(PublishBusinessSelectedBrandFragment publishBusinessSelectedBrandFragment) {
PublishBusinessSelectedBrandAdapter publishBusinessSelectedBrandAdapter = publishBusinessSelectedBrandFragment.b;
if (publishBusinessSelectedBrandAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("selectedBrandAdapter");
}
return publishBusinessSelectedBrandAdapter;
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306175, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.du_trend_fragment_publish_business_selected_brand;
}
public final PublishBusinessCooperationViewModel i() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306174, new Class[0], PublishBusinessCooperationViewModel.class);
return (PublishBusinessCooperationViewModel) (proxy.isSupported ? proxy.result : this.f24406c.getValue());
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initData() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306178, new Class[0], Void.TYPE).isSupported && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306179, new Class[0], Void.TYPE).isSupported) {
i().getBrandSelectedListChange().observe(this, new PublishBusinessSelectedBrandFragment$initLiveData$1(this));
i().getSelectBrandAction().observe(this, new PublishBusinessSelectedBrandFragment$initLiveData$2(this));
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
View view;
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 306176, new Class[]{Bundle.class}, Void.TYPE).isSupported && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306177, new Class[0], Void.TYPE).isSupported) {
this.b = new PublishBusinessSelectedBrandAdapter(new PublishBusinessSelectedBrandFragment$initRecyclerView$1(this));
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer((int) R.id.rvSelected)}, this, changeQuickRedirect, false, 306182, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
view = (View) proxy.result;
} else {
if (this.d == null) {
this.d = new HashMap();
}
View view2 = (View) this.d.get(Integer.valueOf((int) R.id.rvSelected));
if (view2 == null) {
View view3 = getView();
if (view3 == null) {
view = null;
} else {
view2 = view3.findViewById(R.id.rvSelected);
this.d.put(Integer.valueOf((int) R.id.rvSelected), view2);
}
}
view = view2;
}
RecyclerView recyclerView = (RecyclerView) view;
recyclerView.addItemDecoration(new LinearItemDecoration(0, b.b((float) 10), 0, false, false, 24));
PublishBusinessSelectedBrandAdapter publishBusinessSelectedBrandAdapter = this.b;
if (publishBusinessSelectedBrandAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("selectedBrandAdapter");
}
recyclerView.setAdapter(publishBusinessSelectedBrandAdapter);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 306184, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 306188, 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.ui.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
HashMap hashMap;
super.onDestroyView();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306183, new Class[0], Void.TYPE).isSupported && (hashMap = this.d) != null) {
hashMap.clear();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306190, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 306186, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 306192, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
}