小红书.apk(点击下载) / ToyFactoryMsgViewHolder.java


package com.xingin.alpha.adapter.viewholder.toy;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import bz.c;
import bz.d;
import com.xingin.alpha.adapter.viewholder.base.BaseNetIconMsgViewHolder;
import com.xingin.android.mixim.msg.bean.receive.AlphaBaseImMessage;
import com.xingin.android.mixim.msg.bean.receive.AlphaImToyMissionCompleteMessage;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import sy.u;
import uk.a;

@Metadata(bv = {}, d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u001b\u001a\u00020\u001a\u0012\u0006\u0010\u001d\u001a\u00020\u001c¢\u0006\u0004\b\u001e\u0010\u001fJ \u0010\t\u001a\u00020\b2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016RV\u0010\u0016\u001a6\u0012\u0015\u0012\u0013\u0018\u00010\u000b¢\u0006\f\b\f\u0012\b\b\r\u0012\u0004\b\b(\u000e\u0012\u0013\u0012\u00110\u000b¢\u0006\f\b\f\u0012\b\b\r\u0012\u0004\b\b(\u000f\u0012\u0004\u0012\u00020\b\u0018\u00010\n8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0010\u0010\u0011\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u0014\u0010\u0019\u001a\u00020\u000b8\u0002X‚D¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018¨\u0006 "}, d2 = {"Lcom/xingin/alpha/adapter/viewholder/toy/ToyFactoryMsgViewHolder;", "Lcom/xingin/alpha/adapter/viewholder/base/BaseNetIconMsgViewHolder;", "Lcom/xingin/android/mixim/msg/bean/receive/AlphaBaseImMessage;", "msg", "Lbz/c;", "stringBuilder", "Lbz/d;", "tempStyle", "", "x", "Lkotlin/Function2;", "", "Lkotlin/ParameterName;", "name", "toyFactoryPath", "src", "l", "Lkotlin/jvm/functions/Function2;", "getOnHolderClick", "()Lkotlin/jvm/functions/Function2;", "Z", "(Lkotlin/jvm/functions/Function2;)V", "onHolderClick", "m", "Ljava/lang/String;", "placeHolderUrl", "Landroid/content/Context;", "context", "Landroid/view/ViewGroup;", "parent", "<init>", "(Landroid/content/Context;Landroid/view/ViewGroup;)V", "alpha_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: ToyFactoryMsgViewHolder.kt */
public final class ToyFactoryMsgViewHolder extends BaseNetIconMsgViewHolder {

    /* renamed from: l  reason: collision with root package name */
    public Function2<? super String, ? super String, Unit> f41042l;

    /* renamed from: m  reason: collision with root package name */
    public final String f41043m;

    /* renamed from: n  reason: collision with root package name */
    public Map<Integer, View> f41044n = new LinkedHashMap();

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public ToyFactoryMsgViewHolder(Context context, ViewGroup viewGroup) {
        super(context, viewGroup, false);
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(viewGroup, "parent");
        this.f41043m = "https://picasso-static.xiaohongshu.com/picasso-editor/b762eb49dd0fa0dbd36b33dc72e5002f38dc9004";
    }

    public static final void Y(ToyFactoryMsgViewHolder toyFactoryMsgViewHolder, AlphaBaseImMessage alphaBaseImMessage, View view) {
        Intrinsics.checkNotNullParameter(toyFactoryMsgViewHolder, "this$0");
        Intrinsics.checkNotNullParameter(alphaBaseImMessage, "$msg");
        Function2<? super String, ? super String, Unit> function2 = toyFactoryMsgViewHolder.f41042l;
        if (function2 != null) {
            function2.invoke(u.f131753a.f0(), ((AlphaImToyMissionCompleteMessage) alphaBaseImMessage).getSrc());
        }
    }

    @Override // com.xingin.alpha.adapter.viewholder.base.BaseNetIconMsgViewHolder
    public View T(int i10) {
        View findViewById;
        Map<Integer, View> map = this.f41044n;
        View view = map.get(Integer.valueOf(i10));
        if (view != null) {
            return view;
        }
        View i14 = i();
        if (i14 == null || (findViewById = i14.findViewById(i10)) == null) {
            return null;
        }
        map.put(Integer.valueOf(i10), findViewById);
        return findViewById;
    }

    public final void Z(Function2<? super String, ? super String, Unit> function2) {
        this.f41042l = function2;
    }

    @Override // com.xingin.alpha.adapter.viewholder.base.BaseMsgViewHolder
    public void x(AlphaBaseImMessage alphaBaseImMessage, c cVar, d dVar) {
        Intrinsics.checkNotNullParameter(alphaBaseImMessage, "msg");
        Intrinsics.checkNotNullParameter(cVar, "stringBuilder");
        Intrinsics.checkNotNullParameter(dVar, "tempStyle");
        if (alphaBaseImMessage instanceof AlphaImToyMissionCompleteMessage) {
            boolean z14 = false;
            dVar.j(E(), false).d();
            AlphaImToyMissionCompleteMessage alphaImToyMissionCompleteMessage = (AlphaImToyMissionCompleteMessage) alphaBaseImMessage;
            String imageUrl = alphaImToyMissionCompleteMessage.getImageUrl();
            if (imageUrl == null || imageUrl.length() == 0) {
                z14 = true;
            }
            if (z14) {
                V(this.f41043m);
            } else {
                String imageUrl2 = alphaImToyMissionCompleteMessage.getImageUrl();
                if (imageUrl2 != null) {
                    V(imageUrl2);
                }
            }
            cVar.a(alphaBaseImMessage.getDesc(), dVar);
            this.itemView.setOnClickListener(new a(this, alphaBaseImMessage));
        }
    }
}