得物.apk(点击下载) / CollocationContentCardView.java
package com.shizhuang.duapp.modules.productv2.collocation.views;
import a.f;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LifecycleOwner;
import cd.g;
import co.c;
import co.d;
import com.daimajia.androidanimations.library.YoYo;
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.module.AbsModuleView;
import com.shizhuang.duapp.common.component.module.ModuleAdapterDelegateKt;
import com.shizhuang.duapp.common.extension.DrawableScale;
import com.shizhuang.duapp.common.helper.LoginHelper;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.modules.du_mall_common.dialog.MallBaseDialog;
import com.shizhuang.duapp.modules.du_mall_common.extension.LifecycleExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IModuleExposureSectionViewCallback;
import com.shizhuang.duapp.modules.productv2.collocation.home.dialog.CollocationProductFavDialog;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularContent;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularCounter;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularItr;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularModel;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularSpu;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationPopularUser;
import com.shizhuang.duapp.modules.productv2.collocation.model.CollocationRes;
import com.shizhuang.duapp.modules.productv2.collocation.model.ShareItem;
import com.shizhuang.duapp.modules.productv2.collocation.share.CollocationShareDialog;
import com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagContainerView;
import com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagLinearRecycleHelper;
import com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagView;
import com.shizhuang.duapp.modules.router.ServiceManager;
import e60.b;
import j60.k0;
import j60.z;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import o5.i;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\b&\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u00032\u00020\u0004J\b\u0010\u0006\u001a\u00020\u0005H\u0016J\b\u0010\u0007\u001a\u00020\u0005H\u0016R\u001a\u0010\r\u001a\u00020\b8\u0006XD¢\u0006\f\n\u0004\b\t\u0010\n\u001a\u0004\b\u000b\u0010\fR\u001c\u0010\u0013\u001a\u0004\u0018\u00010\u000e8\u0016X\u0004¢\u0006\f\n\u0004\b\u000f\u0010\u0010\u001a\u0004\b\u0011\u0010\u0012¨\u0006\u0014"}, d2 = {"Lcom/shizhuang/duapp/modules/productv2/collocation/views/CollocationContentCardView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/productv2/collocation/model/CollocationPopularModel;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/exposure/IModuleExposureSectionViewCallback;", "Lcom/shizhuang/duapp/modules/productv2/collocation/widget/CollocationTagLinearRecycleHelper$TagHolderView;", "", "getLayoutId", "getSubViewCount", "", "b", "Ljava/lang/String;", "getDefaultAnim", "()Ljava/lang/String;", "defaultAnim", "Lcom/shizhuang/duapp/modules/productv2/collocation/views/CardSensorCallBack;", "c", "Lcom/shizhuang/duapp/modules/productv2/collocation/views/CardSensorCallBack;", "getCardSensorCallBack", "()Lcom/shizhuang/duapp/modules/productv2/collocation/views/CardSensorCallBack;", "cardSensorCallBack", "du_product_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: CollocationContentCardView.kt */
public abstract class CollocationContentCardView extends AbsModuleView<CollocationPopularModel> implements IModuleExposureSectionViewCallback, CollocationTagLinearRecycleHelper.TagHolderView {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public final String b;
@Nullable
/* renamed from: c reason: collision with root package name */
public final CardSensorCallBack f23533c;
public HashMap d;
/* compiled from: CollocationContentCardView.kt */
public static final class a implements Runnable {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView b;
public a(CollocationContentCardView collocationContentCardView) {
this.b = collocationContentCardView;
}
public final void run() {
CollocationPopularModel collocationPopularModel;
CollocationPopularUser user;
boolean z = false;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291943, new Class[0], Void.TYPE).isSupported) {
CollocationContentCardView collocationContentCardView = this.b;
if (!PatchProxy.proxy(new Object[0], collocationContentCardView, CollocationContentCardView.changeQuickRedirect, false, 291916, new Class[0], Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) collocationContentCardView.getData()) != null && (user = collocationPopularModel.getUser()) != null) {
long id2 = user.getId();
String userId = ServiceManager.d().getUserId();
if (userId == null) {
userId = "0";
}
long parseLong = Long.parseLong(userId);
b bVar = b.f31725a;
Context context = collocationContentCardView.getContext();
if (id2 == parseLong) {
z = true;
}
bVar.Y(context, z, user);
}
}
}
}
@JvmOverloads
public CollocationContentCardView(@NotNull Context context) {
this(context, null, null);
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 291930, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.d == null) {
this.d = new HashMap();
}
View view = (View) this.d.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
this.d.put(Integer.valueOf(i), findViewById);
return findViewById;
}
public final void a(boolean z, boolean z4, CollocationPopularModel collocationPopularModel) {
Object[] objArr = {new Byte(z ? (byte) 1 : 0), new Byte(z4 ? (byte) 1 : 0), collocationPopularModel};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Boolean.TYPE;
if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 291918, new Class[]{cls, cls, CollocationPopularModel.class}, Void.TYPE).isSupported) {
CollocationRes itrIcon = collocationPopularModel.getItrIcon();
String str = null;
String lighted = itrIcon != null ? itrIcon.getLighted() : null;
String str2 = "";
if (lighted == null) {
lighted = str2;
}
CollocationRes itrIcon2 = collocationPopularModel.getItrIcon();
if (itrIcon2 != null) {
str = itrIcon2.getUnLight();
}
if (str != null) {
str2 = str;
}
if (z) {
float f = (float) 24;
((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.ivLike)).i(lighted).j0(getContext(), R.drawable.ic_collocation_content_big_like).b0(getContext(), Integer.valueOf((int) R.drawable.ic_collocation_content_big_like)).v(new d(fi.b.b(f), fi.b.b(f)))).x();
} else {
float f12 = (float) 24;
((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.ivLike)).i(str2).j0(getContext(), R.drawable.ic_collocation_content_big_unlike).b0(getContext(), Integer.valueOf((int) R.drawable.ic_collocation_content_big_unlike)).v(new d(fi.b.b(f12), fi.b.b(f12)))).x();
}
if (z && z4) {
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivLike);
if (!PatchProxy.proxy(new Object[]{duImageLoaderView}, this, changeQuickRedirect, false, 291917, new Class[]{ImageView.class}, Void.TYPE).isSupported) {
YoYo.b b2 = YoYo.b(new o3.d());
b2.f4268c = 200;
b2.a(duImageLoaderView);
}
}
}
}
public void b(@NotNull CollocationPopularModel collocationPopularModel) {
if (!PatchProxy.proxy(new Object[]{collocationPopularModel}, this, changeQuickRedirect, false, 291906, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
LoginHelper.k(getContext(), new a(this));
}
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagLinearRecycleHelper.TagHolderView
public void bindingTags() {
CollocationPopularModel collocationPopularModel;
String str;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291922, new Class[0], Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) getData()) != null) {
if (!((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).d()) {
if (!PatchProxy.proxy(new Object[]{collocationPopularModel}, this, changeQuickRedirect, false, 291920, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).removeAllViews();
float b2 = (float) (fi.b.f32351a - fi.b.b((float) 40));
List<CollocationPopularSpu> spu = collocationPopularModel.getSpu();
if (spu != null) {
ArrayList arrayList = new ArrayList();
for (T t : spu) {
T t4 = t;
if ((t4.getTagX() == i.f36333a && t4.getTagX() == i.f36333a) ? false : true) {
arrayList.add(t);
}
}
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
CollocationPopularSpu collocationPopularSpu = (CollocationPopularSpu) it2.next();
String tag = collocationPopularSpu.getTag();
String str2 = tag != null ? tag : "";
String tagDirection = collocationPopularSpu.getTagDirection();
if (tagDirection != null) {
str = tagDirection;
} else {
str = "";
}
CollocationTagView collocationTagView = new CollocationTagView(getContext(), null, 0, new s41.c(str2, collocationPopularSpu.getTagX(), collocationPopularSpu.getTagY(), str, b2, b2, collocationPopularSpu.getX(), collocationPopularSpu.getY(), collocationPopularSpu.getW(), collocationPopularSpu.getH(), collocationPopularSpu.getIndex()), 6);
collocationTagView.setOnClickDot(new CollocationContentCardView$dealTags$$inlined$forEach$lambda$1(collocationPopularSpu, this, b2, collocationPopularModel));
ViewExtensionKt.e(collocationTagView, 0, new CollocationContentCardView$dealTags$$inlined$forEach$lambda$2(collocationPopularSpu, this, b2, collocationPopularModel), 1);
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).addView(collocationTagView, -2, -2);
}
}
}
CollocationTagContainerView collocationTagContainerView = (CollocationTagContainerView) ((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).a(R.id.tagContainer);
if (!PatchProxy.proxy(new Object[0], collocationTagContainerView, CollocationTagContainerView.changeQuickRedirect, false, 291977, new Class[0], Void.TYPE).isSupported) {
collocationTagContainerView.e = true;
collocationTagContainerView.d = true;
int childCount = collocationTagContainerView.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = collocationTagContainerView.getChildAt(i);
if (childAt instanceof CollocationTagView) {
CollocationTagView collocationTagView2 = (CollocationTagView) childAt;
collocationTagView2.setExpand(true);
if (!collocationTagView2.d()) {
collocationTagView2.e();
}
}
}
}
}
if (!((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).c()) {
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).e();
}
}
}
public abstract void c(int i, @NotNull CollocationPopularModel collocationPopularModel);
public abstract void d(int i, @NotNull CollocationPopularModel collocationPopularModel);
@Nullable
public CardSensorCallBack getCardSensorCallBack() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291929, new Class[0], CardSensorCallBack.class);
return proxy.isSupported ? (CardSensorCallBack) proxy.result : this.f23533c;
}
@NotNull
public final String getDefaultAnim() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291905, new Class[0], String.class);
return proxy.isSupported ? (String) proxy.result : this.b;
}
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public int getLayoutId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291907, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.item_collocation_content_big_card;
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IModuleExposureSubViewCallback
@Nullable
public Object getSubItem(int i) {
List<CollocationPopularSpu> spu;
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 291928, new Class[]{Integer.TYPE}, Object.class);
if (proxy.isSupported) {
return proxy.result;
}
if (i == 0) {
return getData();
}
int i3 = i - 1;
CollocationPopularModel collocationPopularModel = (CollocationPopularModel) getData();
if (collocationPopularModel == null || (spu = collocationPopularModel.getSpu()) == null) {
return null;
}
ArrayList arrayList = new ArrayList();
for (T t : spu) {
String tag = t.getTag();
if (!(tag == null || tag.length() == 0)) {
arrayList.add(t);
}
}
return (CollocationPopularSpu) CollectionsKt___CollectionsKt.getOrNull(arrayList, i3);
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IModuleExposureSubViewCallback
@Nullable
public View getSubView(int i) {
boolean z;
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 291927, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (i == 0) {
return this;
}
View childAt = ((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).getChildAt(i - 1);
if (childAt != null && (childAt instanceof CollocationTagView)) {
CollocationTagView collocationTagView = (CollocationTagView) childAt;
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], collocationTagView, CollocationTagView.changeQuickRedirect, false, 291999, new Class[0], Boolean.TYPE);
if (proxy2.isSupported) {
z = ((Boolean) proxy2.result).booleanValue();
} else {
z = collocationTagView.f23539c;
}
if (z) {
return collocationTagView;
}
}
return null;
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IModuleExposureSubViewCallback
public int getSubViewCount() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291926, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : ((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).getChildCount() + 1;
}
public void onAttachedToWindow() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291908, new Class[0], Void.TYPE).isSupported) {
super.onAttachedToWindow();
LifecycleOwner i = LifecycleExtensionKt.i(this);
if (i != null) {
((DuRequestOptions) mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/du_product/bg_mall_collocation_card_bottom.webp").u(new CollocationContentCardView$onAttachedToWindow$$inlined$let$lambda$1(this))).G(i).y();
}
}
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public void onChanged(CollocationPopularModel collocationPopularModel) {
Spannable spannable;
boolean z;
boolean z4;
CollocationPopularModel collocationPopularModel2 = collocationPopularModel;
boolean z5 = true;
int i = 0;
if (!PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291909, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
super.onChanged(collocationPopularModel2);
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivContent);
CollocationPopularContent content = collocationPopularModel2.getContent();
String cover = content != null ? content.getCover() : null;
String str = "";
if (cover == null) {
cover = str;
}
float f = (float) 335;
c cVar = (c) g.a(duImageLoaderView.i(cover), DrawableScale.OneToOne).v(new d(fi.b.b(f), fi.b.b(f)));
float f12 = (float) 2;
c.a0(cVar, (float) fi.b.b(f12), (float) fi.b.b(f12), i.f36333a, i.f36333a, 12, null).d0(600).x();
DuImageLoaderView duImageLoaderView2 = (DuImageLoaderView) _$_findCachedViewById(R.id.ivUserAvatar);
CollocationPopularUser user = collocationPopularModel2.getUser();
duImageLoaderView2.i(user != null ? user.getAvatar() : null).j0(getContext(), R.mipmap.ic_user_icon).b0(getContext(), Integer.valueOf((int) R.mipmap.ic_user_icon)).d0(300).o0(true).x();
TextView textView = (TextView) _$_findCachedViewById(R.id.tvUserName);
CollocationPopularUser user2 = collocationPopularModel2.getUser();
textView.setText(user2 != null ? user2.getName() : null);
TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvTopicTag);
CollocationPopularContent content2 = collocationPopularModel2.getContent();
String theme = content2 != null ? content2.getTheme() : null;
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{theme}, this, changeQuickRedirect, false, 291914, new Class[]{String.class}, Spannable.class);
if (proxy.isSupported) {
spannable = (Spannable) proxy.result;
} else {
if (theme == null || theme.length() == 0) {
spannable = null;
} else {
StringBuilder h12 = f.h("# ");
h12.append(k0.f34202a.a(theme, 8));
SpannableString spannableString = new SpannableString(h12.toString());
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#AEAEB0")), 0, 1, 17);
spannable = spannableString;
}
}
textView2.setText(spannable);
TextView textView3 = (TextView) _$_findCachedViewById(R.id.tvTopicTag);
CharSequence text = ((TextView) _$_findCachedViewById(R.id.tvTopicTag)).getText();
textView3.setVisibility(text == null || text.length() == 0 ? 4 : 0);
TextView textView4 = (TextView) _$_findCachedViewById(R.id.tvProductCount);
CollocationPopularContent content3 = collocationPopularModel2.getContent();
String valueOf = content3 != null ? String.valueOf(content3.getSpuNumber()) : null;
if (valueOf != null) {
str = valueOf;
}
textView4.setText(str);
ImageView imageView = (ImageView) _$_findCachedViewById(R.id.btnContentTagToggle);
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291910, new Class[]{CollocationPopularModel.class}, Boolean.TYPE);
if (proxy2.isSupported) {
z = ((Boolean) proxy2.result).booleanValue();
} else {
List<CollocationPopularSpu> spu = collocationPopularModel2.getSpu();
if (spu != null) {
if (!spu.isEmpty()) {
Iterator<T> it2 = spu.iterator();
while (true) {
if (!it2.hasNext()) {
break;
}
T next = it2.next();
if (next.getTagX() == i.f36333a && next.getTagX() == i.f36333a) {
z4 = false;
continue;
} else {
z4 = true;
continue;
}
if (z4) {
break;
}
}
}
z5 = false;
z = z5;
} else {
z = false;
}
}
if (!z) {
i = 8;
}
imageView.setVisibility(i);
}
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IModuleExposureSectionViewCallback
public void onSubViewExposure(int i) {
CollocationPopularModel collocationPopularModel;
CollocationPopularSpu collocationPopularSpu;
CardSensorCallBack cardSensorCallBack;
if (PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 291925, new Class[]{Integer.TYPE}, Void.TYPE).isSupported || (collocationPopularModel = (CollocationPopularModel) getData()) == null) {
return;
}
if (i == 0) {
CardSensorCallBack cardSensorCallBack2 = getCardSensorCallBack();
if (cardSensorCallBack2 != null) {
cardSensorCallBack2.onItemExposure(ModuleAdapterDelegateKt.b(this) + 1, collocationPopularModel);
}
} else if (((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).d()) {
int i3 = i - 1;
List<CollocationPopularSpu> spu = collocationPopularModel.getSpu();
if (spu != null && (collocationPopularSpu = (CollocationPopularSpu) CollectionsKt___CollectionsKt.getOrNull(spu, i3)) != null && (cardSensorCallBack = getCardSensorCallBack()) != null) {
cardSensorCallBack.onTagExposure(ModuleAdapterDelegateKt.b(this) + 1, collocationPopularSpu, collocationPopularModel);
}
}
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagLinearRecycleHelper.TagHolderView
public void recyclerTagView() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291921, new Class[0], Void.TYPE).isSupported) {
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).b();
}
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagLinearRecycleHelper.TagHolderView
public void startHiddenAnim() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291924, new Class[0], Void.TYPE).isSupported && ((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).c()) {
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).e();
}
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.widget.CollocationTagLinearRecycleHelper.TagHolderView
public void stopAllTagsBreathingAnim() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291923, new Class[0], Void.TYPE).isSupported) {
CollocationTagContainerView collocationTagContainerView = (CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer);
if (!PatchProxy.proxy(new Object[0], collocationTagContainerView, CollocationTagContainerView.changeQuickRedirect, false, 291980, new Class[0], Void.TYPE).isSupported) {
int childCount = collocationTagContainerView.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = collocationTagContainerView.getChildAt(i);
if (childAt instanceof CollocationTagView) {
((CollocationTagView) childAt).c();
}
}
}
}
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.component.module.IModuleView, com.shizhuang.duapp.common.component.module.AbsModuleView
public void update(CollocationPopularModel collocationPopularModel) {
String str;
String str2;
String str3;
String str4;
CollocationPopularModel collocationPopularModel2 = collocationPopularModel;
if (!PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291911, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
super.update(collocationPopularModel2);
if (!PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291913, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
CollocationPopularItr itr = collocationPopularModel2.getItr();
a(itr != null ? itr.isLight() : false, false, collocationPopularModel2);
CollocationPopularCounter counter = collocationPopularModel2.getCounter();
if (counter == null || counter.getLightTimes() != 0) {
CollocationPopularCounter counter2 = collocationPopularModel2.getCounter();
if (!Intrinsics.areEqual(counter2 != null ? counter2.getLightTimesHuman() : null, "0")) {
CollocationPopularCounter counter3 = collocationPopularModel2.getCounter();
str4 = counter3 != null ? counter3.getLightTimesHuman() : null;
if (str4 == null) {
str4 = "";
}
((TextView) _$_findCachedViewById(R.id.tvLikeNum)).setText(str4);
}
}
str4 = "喜欢";
((TextView) _$_findCachedViewById(R.id.tvLikeNum)).setText(str4);
}
if (!PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291912, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
CollocationPopularCounter counter4 = collocationPopularModel2.getCounter();
if (counter4 == null || counter4.getShareTimes() != 0) {
CollocationPopularCounter counter5 = collocationPopularModel2.getCounter();
if (!Intrinsics.areEqual(counter5 != null ? counter5.getShareTimesHuman() : null, "0")) {
CollocationPopularCounter counter6 = collocationPopularModel2.getCounter();
str3 = counter6 != null ? counter6.getShareTimesHuman() : null;
if (str3 == null) {
str3 = "";
}
((TextView) _$_findCachedViewById(R.id.tvShareNum)).setText(str3);
}
}
str3 = "分享";
((TextView) _$_findCachedViewById(R.id.tvShareNum)).setText(str3);
}
if (!PatchProxy.proxy(new Object[]{collocationPopularModel2}, this, changeQuickRedirect, false, 291919, new Class[]{CollocationPopularModel.class}, Void.TYPE).isSupported) {
((CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer)).setMSpuList(null);
List<CollocationPopularSpu> spu = collocationPopularModel2.getSpu();
if (spu != null) {
float b2 = (float) (fi.b.f32351a - fi.b.b((float) 40));
CollocationTagContainerView collocationTagContainerView = (CollocationTagContainerView) _$_findCachedViewById(R.id.tagContainer);
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(spu, 10));
for (T t : spu) {
String tag = t.getTag();
if (tag != null) {
str = tag;
} else {
str = "";
}
float tagX = t.getTagX();
float tagY = t.getTagY();
String tagDirection = t.getTagDirection();
if (tagDirection != null) {
str2 = tagDirection;
} else {
str2 = "";
}
s41.c cVar = new s41.c(str, tagX, tagY, str2, b2, b2, t.getX(), t.getY(), t.getW(), t.getH(), t.getIndex());
CollocationContentCardView$dealTagClick$$inlined$map$lambda$1 collocationContentCardView$dealTagClick$$inlined$map$lambda$1 = new CollocationContentCardView$dealTagClick$$inlined$map$lambda$1(t, this, b2, collocationPopularModel2);
if (!PatchProxy.proxy(new Object[]{collocationContentCardView$dealTagClick$$inlined$map$lambda$1}, cVar, s41.c.changeQuickRedirect, false, 292030, new Class[]{Function0.class}, Void.TYPE).isSupported) {
cVar.f38008a = collocationContentCardView$dealTagClick$$inlined$map$lambda$1;
}
arrayList.add(cVar);
}
collocationTagContainerView.setMSpuList(arrayList);
}
}
}
}
@JvmOverloads
public CollocationContentCardView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, null);
}
@JvmOverloads
public CollocationContentCardView(@NotNull final Context context, @Nullable AttributeSet attributeSet, @Nullable CardSensorCallBack cardSensorCallBack) {
super(context, attributeSet, 0, 4, null);
this.f23533c = cardSensorCallBack;
this.b = "https://cdn.poizon.com/node-common/d8dd8c38-5995-a607-882b-0a4bb64edf1d.webp";
int b2 = fi.b.b((float) 2);
z.b.a((ConstraintLayout) _$_findCachedViewById(R.id.contentLayout), b2, -1);
ViewExtensionKt.e((ImageView) _$_findCachedViewById(R.id.btnContentTagToggle), 0, new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView this$0;
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 291932, new Class[]{View.class}, Void.TYPE).isSupported) {
((CollocationTagContainerView) this.this$0._$_findCachedViewById(R.id.tagContainer)).e();
}
}
}, 1);
ViewExtensionKt.e((LinearLayout) _$_findCachedViewById(R.id.containerUser), 0, new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView.AnonymousClass2 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView this$0;
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
CollocationPopularModel collocationPopularModel;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 291933, new Class[]{View.class}, Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) this.this$0.getData()) != null) {
CardSensorCallBack cardSensorCallBack = this.this$0.getCardSensorCallBack();
if (cardSensorCallBack != null) {
cardSensorCallBack.onUserAvatarClick(ModuleAdapterDelegateKt.b(this.this$0) + 1, collocationPopularModel);
}
this.this$0.b(collocationPopularModel);
}
}
}, 1);
ViewExtensionKt.e(_$_findCachedViewById(R.id.btnShare), 0, new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView.AnonymousClass3 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView this$0;
/* renamed from: com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView$3$a */
/* compiled from: CollocationContentCardView.kt */
public static final class a implements Runnable {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AnonymousClass3 b;
public a(AnonymousClass3 r12) {
this.b = r12;
}
public final void run() {
CollocationPopularModel collocationPopularModel;
CollocationPopularUser user;
String str;
String str2;
CollocationPopularContent content;
CollocationPopularContent content2;
CollocationPopularContent content3;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291935, new Class[0], Void.TYPE).isSupported) {
CollocationContentCardView collocationContentCardView = this.b.this$0;
if (!PatchProxy.proxy(new Object[0], collocationContentCardView, CollocationContentCardView.changeQuickRedirect, false, 291915, new Class[0], Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) collocationContentCardView.getData()) != null && (user = collocationPopularModel.getUser()) != null) {
CollocationPopularModel collocationPopularModel2 = (CollocationPopularModel) collocationContentCardView.getData();
String str3 = null;
String theme = (collocationPopularModel2 == null || (content3 = collocationPopularModel2.getContent()) == null) ? null : content3.getTheme();
String str4 = theme != null ? theme : "";
CollocationPopularModel collocationPopularModel3 = (CollocationPopularModel) collocationContentCardView.getData();
String cover = (collocationPopularModel3 == null || (content2 = collocationPopularModel3.getContent()) == null) ? null : content2.getCover();
if (cover != null) {
str = cover;
} else {
str = "";
}
CollocationPopularModel collocationPopularModel4 = (CollocationPopularModel) collocationContentCardView.getData();
if (!(collocationPopularModel4 == null || (content = collocationPopularModel4.getContent()) == null)) {
str3 = content.getLandingUrl();
}
if (str3 != null) {
str2 = str3;
} else {
str2 = "";
}
Context context = collocationContentCardView.getContext();
if (context instanceof FragmentActivity) {
CollocationShareDialog.f23531g.a(new ShareItem(user.getName(), user.getAvatar(), str4, str, str2)).k(((FragmentActivity) context).getSupportFragmentManager());
}
}
}
}
}
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
CollocationPopularModel collocationPopularModel;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 291934, new Class[]{View.class}, Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) this.this$0.getData()) != null) {
CardSensorCallBack cardSensorCallBack = this.this$0.getCardSensorCallBack();
if (cardSensorCallBack != null) {
cardSensorCallBack.onShareClick(ModuleAdapterDelegateKt.b(this.this$0) + 1, collocationPopularModel);
}
CollocationContentCardView collocationContentCardView = this.this$0;
collocationContentCardView.d(ModuleAdapterDelegateKt.b(collocationContentCardView), collocationPopularModel);
LoginHelper.k(context, new a(this));
}
}
}, 1);
ViewExtensionKt.e(_$_findCachedViewById(R.id.btnLike), 0, new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView.AnonymousClass4 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView this$0;
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
CollocationPopularModel collocationPopularModel;
boolean z = false;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 291936, new Class[]{View.class}, Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) this.this$0.getData()) != null) {
CollocationPopularItr itr = collocationPopularModel.getItr();
if (itr != null) {
z = itr.isLight();
}
boolean z4 = !z;
CardSensorCallBack cardSensorCallBack = this.this$0.getCardSensorCallBack();
if (cardSensorCallBack != null) {
cardSensorCallBack.onLikeClick(z4, ModuleAdapterDelegateKt.b(this.this$0) + 1, collocationPopularModel);
}
this.this$0.a(z4, true, collocationPopularModel);
CollocationContentCardView collocationContentCardView = this.this$0;
collocationContentCardView.c(ModuleAdapterDelegateKt.b(collocationContentCardView), collocationPopularModel);
}
}
}, 1);
ViewExtensionKt.e(_$_findCachedViewById(R.id.btnProductCount), 0, new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView.AnonymousClass5 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ CollocationContentCardView this$0;
/* renamed from: com.shizhuang.duapp.modules.productv2.collocation.views.CollocationContentCardView$5$a */
/* compiled from: CollocationContentCardView.kt */
public static final class a implements Runnable {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AnonymousClass5 b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ CollocationPopularModel f23534c;
public a(AnonymousClass5 r12, CollocationPopularModel collocationPopularModel) {
this.b = r12;
this.f23534c = collocationPopularModel;
}
public final void run() {
CollocationPopularContent content;
CollocationProductFavDialog collocationProductFavDialog;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 291938, new Class[0], Void.TYPE).isSupported && (content = this.f23534c.getContent()) != null) {
long id2 = content.getId();
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Long(id2)}, CollocationProductFavDialog.p, CollocationProductFavDialog.a.changeQuickRedirect, false, 291163, new Class[]{Long.TYPE}, CollocationProductFavDialog.class);
if (proxy.isSupported) {
collocationProductFavDialog = (CollocationProductFavDialog) proxy.result;
} else {
collocationProductFavDialog = new CollocationProductFavDialog();
Bundle bundle = new Bundle();
bundle.putLong("contentId", id2);
Unit unit = Unit.INSTANCE;
collocationProductFavDialog.setArguments(bundle);
}
MallBaseDialog.A(collocationProductFavDialog, context, null, 2, null);
}
}
}
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
CollocationPopularModel collocationPopularModel;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 291937, new Class[]{View.class}, Void.TYPE).isSupported && (collocationPopularModel = (CollocationPopularModel) this.this$0.getData()) != null) {
CardSensorCallBack cardSensorCallBack = this.this$0.getCardSensorCallBack();
if (cardSensorCallBack != null) {
cardSensorCallBack.onSpuPackageClick(ModuleAdapterDelegateKt.b(this.this$0) + 1, collocationPopularModel);
}
LoginHelper.k(context, new a(this, collocationPopularModel));
}
}
}, 1);
}
}