导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - e.java 源代码

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

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


package pe;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import com.bettertogether.remote.model.common.GroupData;
import com.bettertogether.remote.model.common.UserData;
import com.bettertogether.remote.model.response.DashboardResponse;
import com.bettertogether.screens.group.details.GroupDetailsActivity;
import h.k;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.p;

public final class e extends p implements Function1 {

    public final int f15840d;

    public final GroupDetailsActivity f15841e;

    public e(GroupDetailsActivity groupDetailsActivity, int i10) {
        super(1);
        this.f15840d = i10;
        this.f15841e = groupDetailsActivity;
    }

    public final void invoke(boolean z4) {
        int i10 = this.f15840d;
        GroupDetailsActivity groupDetailsActivity = this.f15841e;
        switch (i10) {
            case 0:
                if (z4) {
                    jh.o.R(groupDetailsActivity);
                    break;
                }
                break;
            default:
                if (z4) {
                    String string = groupDetailsActivity.getString(2131952350);
                    Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.notification_title)");
                    String string2 = groupDetailsActivity.getString(2131952344);
                    Intrinsics.checkNotNullExpressionValue(string2, "getString(R.string.notification_message)");
                    String string3 = groupDetailsActivity.getString(2131952349);
                    Intrinsics.checkNotNullExpressionValue(string3, "getString(R.string.notification_positive)");
                    String string4 = groupDetailsActivity.getString(2131952346);
                    Intrinsics.checkNotNullExpressionValue(string4, "getString(R.string.notification_negative)");
                    nl.f.m0(groupDetailsActivity, string, string2, string3, string4, new e(groupDetailsActivity, 0));
                    break;
                }
                break;
        }
    }

    public final Object invoke(Object obj) {
        Object obj2;
        DashboardResponse dashboard;
        boolean z4;
        UserData userData;
        boolean z10;
        Object obj3;
        int i10 = this.f15840d;
        GroupDetailsActivity groupDetailsActivity = this.f15841e;
        switch (i10) {
            case 0:
                invoke(((Boolean) obj).booleanValue());
                break;
            case 1:
                invoke(((Boolean) obj).booleanValue());
                break;
            case 2:
                int intValue = ((Number) obj).intValue();
                String name = groupDetailsActivity.T.name();
                if (Intrinsics.c(name, "Steps")) {
                    p u10 = groupDetailsActivity.u();
                    GroupData groupData = u10.e;
                    List<UserData> members = groupData != null ? groupData.getMembers() : null;
                    if (members != null) {
                        Iterator<T> it = members.iterator();
                        while (true) {
                            if (it.hasNext()) {
                                obj3 = it.next();
                                if (((UserData) obj3).getId() == intValue) {
                                }
                            } else {
                                obj3 = null;
                            }
                        }
                        userData = (UserData) obj3;
                    } else {
                        userData = null;
                    }
                    if (userData != null && userData.getDashboard() != null) {
                        GroupDetailsActivity groupDetailsActivity2 = (q) u10.f583a;
                        Integer h8 = u10.h();
                        Intrinsics.e(h8);
                        int intValue2 = h8.intValue();
                        GroupData groupData2 = u10.e;
                        Intrinsics.e(groupData2);
                        Integer currentWeek = groupData2.getCurrentWeek();
                        GroupData groupData3 = u10.e;
                        Intrinsics.e(groupData3);
                        Integer duration = groupData3.getDuration();
                        Intrinsics.e(duration);
                        int intValue3 = duration.intValue();
                        GroupData groupData4 = u10.e;
                        Integer goal = groupData4 != null ? groupData4.getGoal() : null;
                        GroupData groupData5 = u10.e;
                        Intrinsics.e(groupData5);
                        if (groupData5.hasEndedChallenge()) {
                            GroupData groupData6 = u10.e;
                            Intrinsics.e(groupData6);
                            if (!groupData6.getActive()) {
                                z10 = true;
                                groupDetailsActivity2.I(userData, intValue2, currentWeek, intValue3, goal, z10);
                            }
                        }
                        z10 = false;
                        groupDetailsActivity2.I(userData, intValue2, currentWeek, intValue3, goal, z10);
                    }
                } else if (Intrinsics.c(name, "Weight")) {
                    p u11 = groupDetailsActivity.u();
                    GroupData groupData7 = u11.e;
                    Intrinsics.e(groupData7);
                    List<UserData> members2 = groupData7.getMembers();
                    Intrinsics.e(members2);
                    Iterator<T> it2 = members2.iterator();
                    while (true) {
                        if (it2.hasNext()) {
                            obj2 = it2.next();
                            if (((UserData) obj2).getId() == intValue) {
                            }
                        } else {
                            obj2 = null;
                        }
                    }
                    UserData userData2 = (UserData) obj2;
                    if (userData2 != null && (dashboard = userData2.getDashboard()) != null) {
                        boolean z11 = dashboard.getWeightInfo().getCurrent() == 0.0f;
                        GroupDetailsActivity groupDetailsActivity3 = u11.f583a;
                        if (z11) {
                            String firstName = userData2.getFirstName();
                            Intrinsics.e(firstName);
                            GroupDetailsActivity groupDetailsActivity4 = (q) groupDetailsActivity3;
                            groupDetailsActivity4.getClass();
                            Intrinsics.checkNotNullParameter(firstName, "memberName");
                            k kVar = new k((Context) groupDetailsActivity4);
                            String string = groupDetailsActivity4.getString(2131952246, firstName);
                            Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.member_no_records, memberName)");
                            String str = (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == 0 ? "\u200e" : "\u200f") + string;
                            kVar.u(2131951687);
                            kVar.p(str);
                            kVar.s(2131951895, null);
                            kVar.f().show();
                        } else {
                            GroupDetailsActivity groupDetailsActivity5 = (q) groupDetailsActivity3;
                            Integer h10 = u11.h();
                            Intrinsics.e(h10);
                            int intValue4 = h10.intValue();
                            GroupData groupData8 = u11.e;
                            Intrinsics.e(groupData8);
                            Integer currentWeek2 = groupData8.getCurrentWeek();
                            Intrinsics.e(currentWeek2);
                            GroupData groupData9 = u11.e;
                            Intrinsics.e(groupData9);
                            Integer duration2 = groupData9.getDuration();
                            Intrinsics.e(duration2);
                            int intValue5 = duration2.intValue();
                            GroupData groupData10 = u11.e;
                            Integer goal2 = groupData10 != null ? groupData10.getGoal() : null;
                            GroupData groupData11 = u11.e;
                            Intrinsics.e(groupData11);
                            if (groupData11.hasEndedChallenge()) {
                                GroupData groupData12 = u11.e;
                                Intrinsics.e(groupData12);
                                if (!groupData12.getActive()) {
                                    z4 = true;
                                    groupDetailsActivity5.I(userData2, intValue4, currentWeek2, intValue5, goal2, z4);
                                }
                            }
                            z4 = false;
                            groupDetailsActivity5.I(userData2, intValue4, currentWeek2, intValue5, goal2, z4);
                        }
                    }
                }
                break;
            case 3:
                vl.g gVar = (vl.g) obj;
                Intrinsics.checkNotNullParameter(gVar, "$this$socialMetaTagParameters");
                gVar.a.putString("st", groupDetailsActivity.getString(2131951687));
                String string2 = groupDetailsActivity.getString(2131952361);
                Bundle bundle = gVar.a;
                bundle.putString("sd", string2);
                bundle.putParcelable("si", Uri.parse("https://www.bettertogether-app.com/wp-content/uploads/2022/12/BT-Full-Color-Large_2x-8-1-1024x496.png"));
                break;
            default:
                groupDetailsActivity.hideLoadingDialog();
                xh.k.w();
                Uri uri = ((vl.i) obj).d;
                Intent intent = new Intent("android.intent.action.SEND");
                intent.setType("text/plain");
                String string3 = groupDetailsActivity.getString(2131952087, String.valueOf(uri));
                Intrinsics.checkNotNullExpressionValue(string3, "getString(R.string.invit…on_message, \"$shortLink\")");
                intent.putExtra("android.intent.extra.TEXT", string3);
                groupDetailsActivity.startActivity(Intent.createChooser(intent, "Invite Members"));
                break;
        }
        return Unit.f12192a;
    }
}