导航菜单

页面标题

页面副标题

Mint v5.7.3 - a.java 源代码

正在查看: Mint v5.7.3 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package h7;

import android.app.Activity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import com.htmedia.mint.AppController;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.storydetail.BrandProductItem;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import g7.e;
import g7.m;
import g7.s;
import java.util.HashMap;
import java.util.List;
import x4.sp;

public class a extends RecyclerView.Adapter<c> {
    private final List<BrandProductItem> a;
    private final Activity b;
    private final Config c = AppController.j().g();

    class ViewOnClickListenerC0098a implements View.OnClickListener {
        final BrandProductItem a;

        ViewOnClickListenerC0098a(BrandProductItem brandProductItem) {
            this.a = brandProductItem;
        }

        @Override
        public void onClick(View view) {
            int i = b.a[this.a.getType().ordinal()];
            if (i == 1) {
                s.e(a.this.b, s.h(this.a.getProductAffiliateUrl(), "tag", (e.c() == null || e.c().a() == null || TextUtils.isEmpty(e.c().a().getKeyAmazon())) ? "lm_listicle_app_pw-21" : e.c().a().getKeyAmazon()));
                return;
            }
            if (i == 2) {
                s.f(a.this.b, ((a.this.c == null || a.this.c.getAffiliateAdUrls() == null || TextUtils.isEmpty(a.this.c.getAffiliateAdUrls().getCromaBaseUrl())) ? "https://croma.g2afse.com/click?pid=101&offer_id=28&ref_id=htaffiliate&sub1=HT&sub2=HT-listicle&path=" : a.this.c.getAffiliateAdUrls().getCromaBaseUrl()) + this.a.getProductAffiliateUrl());
                return;
            }
            if (i != 3) {
                return;
            }
            HashMap hashMap = new HashMap();
            hashMap.put("affid", "htaffiliate");
            hashMap.put("affExtParam1", "LM");
            hashMap.put("affExtParam2", "listicle");
            s.g(a.this.b, s.i(this.a.getProductAffiliateUrl(), "cmpid", hashMap));
        }
    }

    static class b {
        static final int[] a;

        static {
            int[] iArr = new int[m.values().length];
            a = iArr;
            try {
                iArr[m.AMAZON.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[m.CROMA.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                a[m.FLIPKART.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
        }
    }

    public static class c extends RecyclerView.ViewHolder {
        public final sp a;

        c(sp spVar) {
            super(spVar.getRoot());
            this.a = spVar;
        }

        public void m(BrandProductItem brandProductItem) {
            if (brandProductItem != null) {
                boolean E = AppController.j().E();
                this.a.e(Boolean.valueOf(E));
                if (brandProductItem.getType() == m.AMAZON) {
                    if (E) {
                        this.a.b.setImageResource(2131232045);
                    } else {
                        this.a.b.setImageResource(2131232044);
                    }
                } else if (brandProductItem.getType() == m.FLIPKART) {
                    this.a.b.setImageResource(2131232470);
                } else if (brandProductItem.getType() == m.CROMA) {
                    this.a.b.setImageResource(2131232378);
                }
                if (brandProductItem.getDiscountedPrice() > 0.0d) {
                    String a = s.a(brandProductItem.getDiscountedPrice());
                    this.a.d.setText("Rs. " + a);
                } else {
                    this.a.d.setText(BuildConfig.FLAVOR);
                }
                if (brandProductItem.getProductPrice() <= 0.0d) {
                    this.a.a.setText(BuildConfig.FLAVOR);
                    return;
                }
                String a2 = s.a(brandProductItem.getProductPrice());
                this.a.a.setText("Rs. " + a2);
                this.a.a.setPaintFlags(16);
            }
        }
    }

    public a(Activity activity, List<BrandProductItem> list) {
        this.b = activity;
        this.a = list;
    }

    public int getItemCount() {
        List<BrandProductItem> list = this.a;
        if (list == null) {
            return 0;
        }
        return list.size();
    }

    public void onBindViewHolder(c cVar, int i) {
        List<BrandProductItem> list = this.a;
        if (list == null || i >= list.size()) {
            return;
        }
        BrandProductItem brandProductItem = this.a.get(i);
        cVar.m(brandProductItem);
        cVar.a.c.setOnClickListener(new ViewOnClickListenerC0098a(brandProductItem));
    }

    public c onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new c(sp.c(LayoutInflater.from(viewGroup.getContext()), viewGroup, false));
    }
}