红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0

以下内容为反编译后的 r.java 源代码,内容仅作参考


package com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.holder;

import android.net.Uri;
import android.text.InputFilter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.dragon.read.NsCommonDepend;
import com.dragon.read.base.Args;
import com.dragon.read.base.skin.SkinDelegate;
import com.dragon.read.base.ssconfig.template.aep;
import com.dragon.read.base.util.JSONUtils;
import com.dragon.read.base.util.ListUtils;
import com.dragon.read.base.util.LogWrapper;
import com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.StaggeredPagerInfiniteHolder;
import com.dragon.read.rpc.model.BookHungerEntrance;
import com.dragon.read.rpc.model.CellViewData;
import com.dragon.read.rpc.model.ClientReqType;
import com.dragon.read.rpc.model.GetBookMallCellChangeRequest;
import com.dragon.read.rpc.model.GetBookMallCellChangeResponse;
import com.dragon.read.rpc.model.TopicData;
import com.dragon.read.util.ImageLoaderUtils;
import com.facebook.drawee.view.SimpleDraweeView;
import com.phoenix.read.R;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import java.util.HashMap;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;

public final class r extends com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.holder.a<StaggeredTopicCardModel> {

    public final ViewGroup f52469a;

    public final com.dragon.read.base.impression.a f52470b;

    public final com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.b f52471c;
    private final StaggeredPagerInfiniteHolder.c h;
    private final SimpleDraweeView i;
    private final ImageView j;
    private final TextView k;
    private final TextView l;
    private final SimpleDraweeView[] m;
    private final TextView n;
    private final TextView o;
    private Disposable p;

    @Override
    public void a() {
        super.a();
        a((String) null);
    }

    private final void b() {
        ImageLoaderUtils.loadImage(this.i, "http://tosv.byted.org/obj/novel-common/img_611_staggered_topic_card_bg_feeling.png");
        SkinDelegate.setImageDrawable(this.j, R.drawable.skin_icon_topic_list_light);
        SkinDelegate.setBackground(this.o, R.color.skin_color_staggered_topic_card_button_light);
        SkinDelegate.setTextColor(this.o, R.color.skin_color_orange_brand_light);
        this.k.setFilters(new InputFilter[]{new InputFilter.LengthFilter(9)});
    }

    private final void c() {
        ImageLoaderUtils.loadImage(this.i, "http://tosv.byted.org/obj/novel-common/img_611_staggered_topic_card_bg_strengthen.png");
        SkinDelegate.setImageDrawable(this.j, R.drawable.skin_icon_staggered_topic_card_light);
        SkinDelegate.setBackground(this.o, R.color.skin_color_gray_03_light);
        SkinDelegate.setTextColor(this.o, R.color.skin_color_black_light);
        this.k.setFilters(new InputFilter[]{new InputFilter.LengthFilter(8)});
    }

    private final Args n() {
        Args args;
        Args args2 = new Args();
        StaggeredPagerInfiniteHolder.c cVar = this.h;
        if (cVar != null) {
            args = cVar.a();
        } else {
            args = null;
        }
        args2.putAll(args);
        com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.f.o(args2);
        Args put = args2.put("unlimited_content_type", "hot_topic").put("content_rank", Integer.valueOf(getLayoutPosition() + 1)).put("rank", Integer.valueOf(getLayoutPosition() + 1)).put("recommend_info", ((StaggeredTopicCardModel) getBoundData()).getImpressionRecommendInfo()).put("if_outside_show_book", 0).put("if_enter_from_small_card", "1").put("card_left_right_position", m());
        Intrinsics.checkNotNullExpressionValue(put, "args.put(ReportConst.KEY…N, cardLeftRightPosition)");
        return put;
    }

    private final void o() {
        List<TopicData> list;
        if (aep.f44721a.a().f44723b && !((StaggeredTopicCardModel) getBoundData()).isLoading()) {
            CellViewData cellViewData = ((StaggeredTopicCardModel) getBoundData()).originalData;
            if (cellViewData != null) {
                list = cellViewData.topicData;
            } else {
                list = null;
            }
            if (ListUtils.isEmpty(list)) {
                GetBookMallCellChangeRequest getBookMallCellChangeRequest = new GetBookMallCellChangeRequest();
                getBookMallCellChangeRequest.reqSource = "topic_list";
                getBookMallCellChangeRequest.offset = 0L;
                getBookMallCellChangeRequest.streamCount = "[{\"StreamType\":1,\"scene\":1,\"StreamCount\":6}]";
                getBookMallCellChangeRequest.limit = 10L;
                getBookMallCellChangeRequest.clientReqType = ClientReqType.Open;
                getBookMallCellChangeRequest.cellId = 6914906572011339784L;
                getBookMallCellChangeRequest.planId = com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.monitor.f.b(this.h);
                getBookMallCellChangeRequest.tabType = ((StaggeredTopicCardModel) getBoundData()).getTabType();
                ((StaggeredTopicCardModel) getBoundData()).setLoading(false);
                this.p = com.dragon.read.rpc.rpc.a.a(getBookMallCellChangeRequest).observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.io()).subscribe(new a());
            }
        }
    }

    @Override
    public void a(String str) {
        Args n = n();
        if (str != null) {
            n.put("click_to", str);
            com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.f.j(n);
        } else {
            com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.f.i(n);
        }
    }

    public static final class a<T> implements Consumer<GetBookMallCellChangeResponse> {
        a() {
        }

        @Override
        public final void accept(GetBookMallCellChangeResponse getBookMallCellChangeResponse) {
            CellViewData cellViewData = ((StaggeredTopicCardModel) r.this.getBoundData()).originalData;
            if (cellViewData != null) {
                cellViewData.topicData = getBookMallCellChangeResponse.data.cellView.topicData;
            }
            ((StaggeredTopicCardModel) r.this.getBoundData()).setLoading(false);
        }
    }

    private final void a(StaggeredTopicCardModel staggeredTopicCardModel) {
        List<TopicData> list;
        CellViewData cellViewData = staggeredTopicCardModel.originalData;
        if (cellViewData != null) {
            list = cellViewData.topicData;
        } else {
            list = null;
        }
        if (ListUtils.isEmpty(list)) {
            return;
        }
        try {
            String authority = Uri.parse(staggeredTopicCardModel.getCellUrl()).getAuthority();
            if (authority != null && StringsKt.startsWith$default(authority, "lynxview", false, 2, (Object) null)) {
                String json = JSONUtils.toJson(staggeredTopicCardModel.originalData);
                HashMap hashMap = new HashMap();
                Intrinsics.checkNotNullExpressionValue(json, "json");
                hashMap.put(com.bytedance.accountseal.a.l.n, json);
                com.dragon.read.pages.bullet.e.f69526a.a(hashMap);
            }
        } catch (Exception unused) {
            LogWrapper.i("书荒lynx落地页的预加载数据处理失败", staggeredTopicCardModel.getCellName());
        }
    }

    @Override
    public void a(View view) {
        d(com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.monitor.f.a(this.h));
        a("hot_topic_list");
        T boundData = getBoundData();
        Intrinsics.checkNotNullExpressionValue(boundData, "boundData");
        a((StaggeredTopicCardModel) boundData);
        c(com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.monitor.f.a(this.h));
        NsCommonDepend.IMPL.appNavigator().openUrl(getContext(), ((StaggeredTopicCardModel) getBoundData()).getCellUrl(), j().addParam(n()));
    }

    @Override
    public void onBind(StaggeredTopicCardModel staggeredTopicCardModel, int i) {
        super.onBind((r) staggeredTopicCardModel, i);
        if (staggeredTopicCardModel == null) {
            return;
        }
        o();
        this.k.setText(staggeredTopicCardModel.getCellName());
        this.l.setText(staggeredTopicCardModel.getAbstractInfo());
        this.n.setText(staggeredTopicCardModel.getRecommendInfoText());
        this.o.setText("立即进入");
        ImageLoaderUtils.loadImage(this.m[0], staggeredTopicCardModel.getAvatarList().get(0));
        ImageLoaderUtils.loadImage(this.m[1], staggeredTopicCardModel.getAvatarList().get(1));
        ImageLoaderUtils.loadImage(this.m[2], staggeredTopicCardModel.getAvatarList().get(2));
        if (staggeredTopicCardModel.getCardStyle() == BookHungerEntrance.StrengthenBookHunger) {
            c();
        } else {
            b();
        }
    }

    public r(ViewGroup parent, com.dragon.read.base.impression.a imp, StaggeredPagerInfiniteHolder.c cVar, com.dragon.read.component.biz.impl.bookmall.holder.staggeredinfinite.b actionCallback) {
        super(LayoutInflater.from(parent.getContext()).inflate(R.layout.a88, parent, false), imp);
        Intrinsics.checkNotNullParameter(parent, "parent");
        Intrinsics.checkNotNullParameter(imp, "imp");
        Intrinsics.checkNotNullParameter(actionCallback, "actionCallback");
        this.f52469a = parent;
        this.f52470b = imp;
        this.h = cVar;
        this.f52471c = actionCallback;
        this.i = (SimpleDraweeView) this.itemView.findViewById(R.id.akm);
        this.j = (ImageView) this.itemView.findViewById(R.id.ezd);
        this.k = (TextView) this.itemView.findViewById(R.id.c_);
        this.l = (TextView) this.itemView.findViewById(R.id.sb);
        View findViewById = this.itemView.findViewById(R.id.a4b);
        Intrinsics.checkNotNullExpressionValue(findViewById, "itemView.findViewById(R.id.avatar1_sdv)");
        View findViewById2 = this.itemView.findViewById(R.id.a4c);
        Intrinsics.checkNotNullExpressionValue(findViewById2, "itemView.findViewById(R.id.avatar2_sdv)");
        View findViewById3 = this.itemView.findViewById(R.id.a4d);
        Intrinsics.checkNotNullExpressionValue(findViewById3, "itemView.findViewById(R.id.avatar3_sdv)");
        this.m = new SimpleDraweeView[]{(SimpleDraweeView) findViewById, (SimpleDraweeView) findViewById2, (SimpleDraweeView) findViewById3};
        this.n = (TextView) this.itemView.findViewById(R.id.dyb);
        this.o = (TextView) this.itemView.findViewById(R.id.bmh);
    }
}