导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - b.java 源代码

正在查看: BetterTogether v3.0.0 应用的 b.java JAVA 源代码文件

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


package ve;

import a0.g0;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.s1;
import bh.a;
import bh.f;
import cd.y0;
import com.bettertogether.remote.model.common.GroupData;
import com.bettertogether.remote.model.common.UserData;
import com.bettertogether.screens.main.MainActivity;
import com.bumptech.glide.l;
import com.google.android.material.imageview.ShapeableImageView;
import g3.g;
import java.util.ArrayList;
import java.util.List;
import kotlin.collections.f0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import tf.o;
import vs.IiM.qIRR;
import z2.h;
import zf.d;

public final class b extends s1 {
    public static final int B = 0;
    public final ConstraintLayout A;
    public final y0 t;

    public final Context f930u;

    public final TextView f931v;
    public final TextView w;
    public final TextView x;
    public final TextView y;
    public final ImageView z;

    public b(y0 y0Var) {
        super(y0Var.a);
        Intrinsics.checkNotNullParameter(y0Var, "binding");
        this.t = y0Var;
        Context context = this.itemView.getContext();
        Intrinsics.checkNotNullExpressionValue(context, "itemView.context");
        this.f930u = context;
        View findViewById = this.itemView.findViewById(2131363088);
        Intrinsics.checkNotNullExpressionValue(findViewById, "itemView.findViewById(R.id.tvGroupName)");
        this.f931v = (TextView) findViewById;
        View findViewById2 = this.itemView.findViewById(2131363224);
        Intrinsics.checkNotNullExpressionValue(findViewById2, "itemView.findViewById(R.id.tvWeightTarget)");
        this.w = (TextView) findViewById2;
        View findViewById3 = this.itemView.findViewById(2131363115);
        Intrinsics.checkNotNullExpressionValue(findViewById3, "itemView.findViewById(R.id.tvMembers)");
        this.x = (TextView) findViewById3;
        View findViewById4 = this.itemView.findViewById(2131363040);
        Intrinsics.checkNotNullExpressionValue(findViewById4, "itemView.findViewById(R.id.tvDaysLeft)");
        this.y = (TextView) findViewById4;
        View findViewById5 = this.itemView.findViewById(2131362358);
        Intrinsics.checkNotNullExpressionValue(findViewById5, "itemView.findViewById(R.id.ivGroupCover)");
        this.z = (ImageView) findViewById5;
        ConstraintLayout findViewById6 = this.itemView.findViewById(2131362143);
        Intrinsics.checkNotNullExpressionValue(findViewById6, "itemView.findViewById(R.id.cvGroup)");
        this.A = findViewById6;
        View findViewById7 = this.itemView.findViewById(2131362872);
        Intrinsics.checkNotNullExpressionValue(findViewById7, qIRR.gcAslrYdHyEFA);
        Intrinsics.checkNotNullExpressionValue(this.itemView.findViewById(2131362740), "itemView.findViewById(R.id.rvImagelist)");
    }

    public static void o(ShapeableImageView shapeableImageView, String str) {
        l D = com.bumptech.glide.b.e(shapeableImageView.getContext()).i().D(str);
        o oVar = d.a;
        l z = D.z(D.y().z((l) null).G().D("https://d376fyzjbo9nop.cloudfront.net/storyly/avatar.png"));
        if (f.f0 == null) {
            f b = new f().b();
            if (((a) b).Y && !((a) b).a0) {
                throw new IllegalStateException("You cannot auto lock an already locked options object, try clone() first");
            }
            ((a) b).a0 = true;
            ((a) b).Y = true;
            f.f0 = b;
        }
        l w = z.w(f.f0);
        w.B(new a(shapeableImageView), w);
    }

    public final void n(bg.b bVar, GroupData groupData, Function1 function1, int i, boolean z) {
        String string;
        ArrayList arrayList;
        String photo;
        String o;
        Intrinsics.checkNotNullParameter(bVar, "imageLoader");
        Intrinsics.checkNotNullParameter(groupData, "group");
        Intrinsics.checkNotNullParameter(function1, "onGroupSelected");
        ConstraintLayout constraintLayout = this.A;
        if (i > 0) {
            u2.d dVar = new u2.d(-1);
            dVar.setMargins(50, 50, 50, 0);
            constraintLayout.setLayoutParams(dVar);
        } else {
            u2.d dVar2 = new u2.d(-1);
            dVar2.setMargins(50, 1, 50, 0);
            constraintLayout.setLayoutParams(dVar2);
        }
        int i2 = z ? 2131230877 : 2131230878;
        Context context = this.f930u;
        constraintLayout.setBackground(h.getDrawable(context, i2));
        String name = groupData.getName();
        if (name != null) {
            this.f931v.setText(name);
        }
        Integer goal = groupData.getGoal();
        if (goal != null) {
            int intValue = goal.intValue();
            if (groupData.hasToKeepFit()) {
                o = context.getString(2131952094);
            } else {
                String string2 = context.getString(2131951734);
                Intrinsics.checkNotNullExpressionValue(string2, "context.getString(R.string.challenge_target)");
                o = g0.b.o(new Object[]{Integer.valueOf(intValue)}, 1, string2, "format(...)");
            }
            this.w.setText(o);
        }
        List members = groupData.getMembers();
        if (members != null) {
            this.x.setText(String.valueOf(members.size()));
        }
        Integer timeLeft = groupData.getTimeLeft();
        if (timeLeft != null) {
            string = timeLeft.intValue() == 1 ? context.getString(2131951876, timeLeft) : timeLeft.intValue() > 1 ? context.getString(2131951879, timeLeft) : (timeLeft.intValue() == 0 && g.O(groupData)) ? context.getString(2131951731) : (timeLeft.intValue() == -1 && g.O(groupData)) ? context.getString(2131951876, 1) : context.getString(2131951731);
            Intrinsics.checkNotNullExpressionValue(string, "{\n//                val …          }\n            }");
        } else {
            string = groupData.getActive() ? context.getString(2131951728, groupData.getDuration()) : context.getString(2131951731);
            Intrinsics.checkNotNullExpressionValue(string, "{\n                if (gr…          }\n            }");
        }
        et.d.d("days left").c("the days left is " + groupData.getName() + " " + groupData.getTimeLeft(), new Object[0]);
        this.y.setText(string);
        String icon = groupData.getIcon();
        if (icon != null && !new MainActivity().isDestroyed()) {
            bVar.getClass();
            bg.b.c(context, icon, this.z);
        }
        constraintLayout.setOnClickListener(new fc.a(12, function1, groupData));
        et.d.c(g0.b.k("GroupViewHolder group name: ", groupData.getName(), "********"), new Object[0]);
        List members2 = groupData.getMembers();
        if (members2 == null || members2.isEmpty()) {
            et.d.c(g0.b.k("GroupViewHolder group name: ", groupData.getName(), "******** empty data"), new Object[0]);
            arrayList = new ArrayList();
        } else {
            List members3 = groupData.getMembers();
            if (members3 != null) {
                List<UserData> list = members3;
                arrayList = new ArrayList(f0.k(list, 10));
                for (UserData userData : list) {
                    et.d.c(g0.j("GroupViewHolder group name: data: ", userData.getPhoto()), new Object[0]);
                    String photo2 = userData.getPhoto();
                    if (photo2 == null || photo2.length() == 0) {
                        o oVar = d.a;
                        photo = "https://d376fyzjbo9nop.cloudfront.net/storyly/avatar.png";
                    } else {
                        photo = userData.getPhoto();
                    }
                    arrayList.add(photo);
                }
            } else {
                arrayList = null;
            }
            Intrinsics.f(arrayList, "null cannot be cast to non-null type java.util.ArrayList<kotlin.Any>{ kotlin.collections.TypeAliasesKt.ArrayList<kotlin.Any> }");
        }
        int size = arrayList.size();
        y0 y0Var = this.t;
        if (size == 0) {
            y0Var.b.b.setVisibility(8);
            n9.b bVar2 = y0Var.b;
            bVar2.e.setVisibility(8);
            bVar2.g.setVisibility(8);
            bVar2.h.setVisibility(8);
            ((RelativeLayout) bVar2.c).setVisibility(8);
            return;
        }
        if (size == 1) {
            ShapeableImageView shapeableImageView = y0Var.b.b;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView, "stackView.profileImage");
            Object obj = arrayList.get(0);
            Intrinsics.f(obj, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView, (String) obj);
            n9.b bVar3 = y0Var.b;
            bVar3.b.setVisibility(0);
            bVar3.e.setVisibility(8);
            bVar3.g.setVisibility(8);
            bVar3.h.setVisibility(8);
            ((RelativeLayout) bVar3.c).setVisibility(8);
            return;
        }
        if (size == 2) {
            ShapeableImageView shapeableImageView2 = y0Var.b.b;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView2, "stackView.profileImage");
            Object obj2 = arrayList.get(0);
            Intrinsics.f(obj2, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView2, (String) obj2);
            n9.b bVar4 = y0Var.b;
            ShapeableImageView shapeableImageView3 = bVar4.e;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView3, "stackView.profileImage2");
            Object obj3 = arrayList.get(1);
            Intrinsics.f(obj3, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView3, (String) obj3);
            bVar4.b.setVisibility(0);
            bVar4.e.setVisibility(0);
            bVar4.g.setVisibility(8);
            bVar4.h.setVisibility(8);
            ((RelativeLayout) bVar4.c).setVisibility(8);
            return;
        }
        if (size == 3) {
            ShapeableImageView shapeableImageView4 = y0Var.b.b;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView4, "stackView.profileImage");
            Object obj4 = arrayList.get(0);
            Intrinsics.f(obj4, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView4, (String) obj4);
            n9.b bVar5 = y0Var.b;
            ShapeableImageView shapeableImageView5 = bVar5.e;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView5, "stackView.profileImage2");
            Object obj5 = arrayList.get(1);
            Intrinsics.f(obj5, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView5, (String) obj5);
            ShapeableImageView shapeableImageView6 = bVar5.g;
            ShapeableImageView shapeableImageView7 = shapeableImageView6;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView7, "stackView.profileImage3");
            Object obj6 = arrayList.get(2);
            Intrinsics.f(obj6, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView7, (String) obj6);
            bVar5.b.setVisibility(0);
            bVar5.e.setVisibility(0);
            shapeableImageView6.setVisibility(0);
            bVar5.h.setVisibility(8);
            ((RelativeLayout) bVar5.c).setVisibility(8);
            return;
        }
        if (size == 4) {
            ShapeableImageView shapeableImageView8 = y0Var.b.b;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView8, "stackView.profileImage");
            Object obj7 = arrayList.get(0);
            Intrinsics.f(obj7, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView8, (String) obj7);
            n9.b bVar6 = y0Var.b;
            ShapeableImageView shapeableImageView9 = bVar6.e;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView9, "stackView.profileImage2");
            Object obj8 = arrayList.get(1);
            Intrinsics.f(obj8, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView9, (String) obj8);
            ShapeableImageView shapeableImageView10 = bVar6.g;
            ShapeableImageView shapeableImageView11 = shapeableImageView10;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView11, "stackView.profileImage3");
            Object obj9 = arrayList.get(2);
            Intrinsics.f(obj9, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView11, (String) obj9);
            ShapeableImageView shapeableImageView12 = bVar6.h;
            ShapeableImageView shapeableImageView13 = shapeableImageView12;
            Intrinsics.checkNotNullExpressionValue(shapeableImageView13, "stackView.profileImage4");
            Object obj10 = arrayList.get(3);
            Intrinsics.f(obj10, "null cannot be cast to non-null type kotlin.String");
            o(shapeableImageView13, (String) obj10);
            bVar6.b.setVisibility(0);
            bVar6.e.setVisibility(0);
            shapeableImageView10.setVisibility(0);
            shapeableImageView12.setVisibility(0);
            ((RelativeLayout) bVar6.c).setVisibility(8);
            return;
        }
        ShapeableImageView shapeableImageView14 = y0Var.b.b;
        Intrinsics.checkNotNullExpressionValue(shapeableImageView14, "stackView.profileImage");
        Object obj11 = arrayList.get(0);
        Intrinsics.f(obj11, "null cannot be cast to non-null type kotlin.String");
        o(shapeableImageView14, (String) obj11);
        n9.b bVar7 = y0Var.b;
        ShapeableImageView shapeableImageView15 = bVar7.e;
        Intrinsics.checkNotNullExpressionValue(shapeableImageView15, "stackView.profileImage2");
        Object obj12 = arrayList.get(1);
        Intrinsics.f(obj12, "null cannot be cast to non-null type kotlin.String");
        o(shapeableImageView15, (String) obj12);
        ShapeableImageView shapeableImageView16 = bVar7.g;
        ShapeableImageView shapeableImageView17 = shapeableImageView16;
        Intrinsics.checkNotNullExpressionValue(shapeableImageView17, "stackView.profileImage3");
        Object obj13 = arrayList.get(3);
        Intrinsics.f(obj13, "null cannot be cast to non-null type kotlin.String");
        o(shapeableImageView17, (String) obj13);
        ShapeableImageView shapeableImageView18 = bVar7.h;
        ShapeableImageView shapeableImageView19 = shapeableImageView18;
        Intrinsics.checkNotNullExpressionValue(shapeableImageView19, "stackView.profileImage4");
        Object obj14 = arrayList.get(4);
        Intrinsics.f(obj14, "null cannot be cast to non-null type kotlin.String");
        o(shapeableImageView19, (String) obj14);
        bVar7.b.setVisibility(0);
        bVar7.e.setVisibility(0);
        shapeableImageView16.setVisibility(0);
        shapeableImageView18.setVisibility(0);
        ((RelativeLayout) bVar7.c).setVisibility(0);
        bVar7.i.setText((arrayList.size() - 4) + "+");
    }
}