导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - InviteGroupActivity.java 源代码

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

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


package com.bettertogether.screens.group.invite;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import cd.q;
import com.bettertogether.base.BaseActivity;
import com.bettertogether.remote.model.common.GroupData;
import com.bettertogether.screens.group.details.GroupDetailsActivity;
import com.bettertogether.screens.group.invite.InviteGroupActivity;
import com.bettertogether.screens.main.MainActivity;
import com.google.firebase.messaging.e;
import h.k;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.g0;
import lq.m;
import lq.n;
import lq.o;
import lq.x;
import md.l;
import s6.s;
import s6.t;
import s8.h;
import te.b;
import te.d;
import te.i;
import te.j;
import xs.c;
import ys.a;

@Metadata
public final class InviteGroupActivity extends BaseActivity implements j, k7.j {

    public static final s f4996w = new s(26, 0);

    public final m f4997e;

    public final x f4998i;

    public GroupData f4999v;

    public InviteGroupActivity() {
        h s10 = e.s(this);
        this.f4997e = n.a(o.f13215d, new l(((a) s10.a).a(e.o(), new c(g0.a(InviteGroupActivity.class))), new d(this, 1), 12));
        this.f4998i = n.b(new d(this, 0));
    }

    @Override
    public final void d(GroupData groupData) {
        Intrinsics.checkNotNullParameter(groupData, "groupData");
        String string = getString(2131951683, groupData.getName());
        Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.alrea…enrolled, groupData.name)");
        t(string);
    }

    @Override
    public final void f(GroupData groupData) {
        Intrinsics.checkNotNullParameter(groupData, "groupData");
        this.f4999v = groupData;
        q s10 = s();
        s10.f4388k.setText(2131952057);
        String name = groupData.getName();
        TextView textView = s10.f4385h;
        if (name != null) {
            s10.f4389l.setText(getString(2131952036, name));
            textView.setText(getString(2131952091));
        }
        Integer duration = groupData.getDuration();
        if (duration != null) {
            s10.f4383f.setText(getString(2131951728, Integer.valueOf(duration.intValue())));
        }
        Integer goal = groupData.getGoal();
        if (goal != null) {
            s10.f4391n.setText(getString(2131952619, Integer.valueOf(goal.intValue())));
        }
        Integer steps = groupData.getSteps();
        if (steps != null) {
            s10.f4387j.setText(getString(2131952523, Integer.valueOf(steps.intValue())));
        }
        Integer floors = groupData.getFloors();
        if (floors != null) {
            s10.f4384g.setText(getString(2131952006, Integer.valueOf(floors.intValue())));
        }
        Integer water = groupData.getWater();
        if (water != null) {
            s10.f4390m.setText(getString(2131952599, Integer.valueOf(water.intValue())));
        }
        String prize = groupData.getPrize();
        if (prize != null) {
            s10.f4386i.setText(prize);
        }
        final int i10 = 0;
        s10.f4379b.setVisibility(0);
        textView.setVisibility(0);
        textView.setOnClickListener(new View.OnClickListener(this) {

            public final InviteGroupActivity f18059e;

            {
                this.f18059e = this;
            }

            @Override
            public final void onClick(View view) {
                int i11 = i10;
                InviteGroupActivity inviteGroupActivity = this.f18059e;
                switch (i11) {
                    case 0:
                        s sVar = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(inviteGroupActivity, "this$0");
                        ((i) inviteGroupActivity.f4997e.getValue()).f(null);
                        break;
                    default:
                        s sVar2 = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(inviteGroupActivity, "this$0");
                        inviteGroupActivity.u();
                        break;
                }
            }
        });
        final int i11 = 1;
        s10.f4380c.setOnClickListener(new View.OnClickListener(this) {

            public final InviteGroupActivity f18059e;

            {
                this.f18059e = this;
            }

            @Override
            public final void onClick(View view) {
                int i112 = i11;
                InviteGroupActivity inviteGroupActivity = this.f18059e;
                switch (i112) {
                    case 0:
                        s sVar = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(inviteGroupActivity, "this$0");
                        ((i) inviteGroupActivity.f4997e.getValue()).f(null);
                        break;
                    default:
                        s sVar2 = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(inviteGroupActivity, "this$0");
                        inviteGroupActivity.u();
                        break;
                }
            }
        });
    }

    @Override
    public final void g() {
        String string = getString(2131951947);
        Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.expired_invitation_link)");
        t(string);
    }

    @Override
    public final View getView() {
        SwipeRefreshLayout swipeRefreshLayout = s().f4378a;
        Intrinsics.checkNotNullExpressionValue(swipeRefreshLayout, "binding.root");
        return swipeRefreshLayout;
    }

    @Override
    public final void hideLoadingDialog() {
        enableViews();
        if (s().f4382e.f2609i) {
            s().f4382e.setRefreshing(false);
        } else {
            s().f4381d.a();
        }
    }

    @Override
    public final void initViews() {
    }

    @Override
    public final void l() {
        t tVar = GroupDetailsActivity.Y;
        GroupData groupData = this.f4999v;
        if (groupData != null) {
            startActivity(t.j(this, groupData, true, null));
        } else {
            Intrinsics.m("groupData");
            throw null;
        }
    }

    @Override
    public final void onActivityResult(int i10, int i11, Intent intent) {
        super.onActivityResult(i10, i11, intent);
        if (i10 == 7744) {
            MainActivity.Companion.getClass();
            startActivity(ye.a.a(this, null));
        }
    }

    @Override
    public final void onBackPressed() {
        u();
    }

    @Override
    public final void onRefresh() {
        ((i) this.f4997e.getValue()).e();
    }

    @Override
    public final ad.a providePresenter() {
        return (i) this.f4997e.getValue();
    }

    public final q s() {
        return (q) this.f4998i.getValue();
    }

    @Override
    public final void showLoadingDialog() {
        disableViews();
        if (s().f4382e.f2609i) {
            return;
        }
        s().f4381d.b();
    }

    public final void t(String str) {
        k kVar = new k((Context) this);
        kVar.u(2131951687);
        kVar.p(str);
        kVar.s(2131952358, null);
        kVar.r(new b(this, 1));
        kVar.f().show();
    }

    public final void u() {
        k kVar = new k((Context) this);
        kVar.u(2131951687);
        kVar.o(2131952471);
        final int i10 = 0;
        kVar.s(2131951827, new DialogInterface.OnClickListener(this) {

            public final InviteGroupActivity f18055e;

            {
                this.f18055e = this;
            }

            @Override
            public final void onClick(DialogInterface dialogInterface, int i11) {
                int i12 = i10;
                y2.m mVar = this.f18055e;
                switch (i12) {
                    case 0:
                        s sVar = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(mVar, "this$0");
                        mVar.getClass();
                        MainActivity.Companion.getClass();
                        mVar.startActivity(ye.a.a(mVar, null));
                        break;
                    default:
                        s sVar2 = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(mVar, "this$0");
                        mVar.hideLoadingDialog();
                        break;
                }
            }
        });
        final int i11 = 1;
        kVar.q(2131951723, new DialogInterface.OnClickListener(this) {

            public final InviteGroupActivity f18055e;

            {
                this.f18055e = this;
            }

            @Override
            public final void onClick(DialogInterface dialogInterface, int i112) {
                int i12 = i11;
                y2.m mVar = this.f18055e;
                switch (i12) {
                    case 0:
                        s sVar = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(mVar, "this$0");
                        mVar.getClass();
                        MainActivity.Companion.getClass();
                        mVar.startActivity(ye.a.a(mVar, null));
                        break;
                    default:
                        s sVar2 = InviteGroupActivity.f4996w;
                        Intrinsics.checkNotNullParameter(mVar, "this$0");
                        mVar.hideLoadingDialog();
                        break;
                }
            }
        });
        kVar.r(new b(this, 0));
        kVar.f().show();
    }
}