discord-jadx/app/src/main/java/b/a/a/e.java

180 lines
7.6 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.a.a;
2021-08-03 07:33:18 +00:00
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
2021-09-15 06:33:54 +00:00
import androidx.fragment.app.FragmentManager;
2022-03-28 08:10:50 +00:00
import b.a.i.o1;
import com.discord.R;
2021-08-03 07:33:18 +00:00
import com.discord.app.AppDialog;
import com.discord.dialogs.SimpleConfirmationDialogArgs;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
import com.google.android.material.button.MaterialButton;
2021-11-02 06:38:17 +00:00
import d0.g;
import d0.z.d.a0;
import d0.z.d.k;
import d0.z.d.m;
import d0.z.d.o;
2021-08-03 07:33:18 +00:00
import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
/* compiled from: SimpleConfirmationDialog.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes.dex */
2021-12-17 21:59:34 +00:00
public final class e extends AppDialog {
2022-03-21 18:52:30 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(e.class, "binding", "getBinding()Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0)};
2021-12-02 18:53:44 +00:00
public static final c k = new c(null);
public View.OnClickListener m;
2022-03-07 09:34:54 +00:00
public final Lazy l = g.lazy(new b(this, "intent_args_key"));
2021-12-17 21:59:34 +00:00
public final FragmentViewBindingDelegate n = FragmentViewBindingDelegateKt.viewBinding$default(this, d.j, null, 2, null);
2021-08-03 07:33:18 +00:00
/* compiled from: java-style lambda group */
2022-03-21 18:52:30 +00:00
/* loaded from: classes.dex */
2021-08-03 07:33:18 +00:00
public static final class a implements View.OnClickListener {
2021-12-02 18:53:44 +00:00
public final /* synthetic */ int j;
public final /* synthetic */ Object k;
2021-08-03 07:33:18 +00:00
public a(int i, Object obj) {
2021-12-02 18:53:44 +00:00
this.j = i;
this.k = obj;
2021-08-03 07:33:18 +00:00
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
2021-12-02 18:53:44 +00:00
int i = this.j;
2021-08-03 07:33:18 +00:00
if (i == 0) {
2021-12-17 21:59:34 +00:00
View.OnClickListener onClickListener = ((e) this.k).m;
2021-08-03 07:33:18 +00:00
if (onClickListener != null) {
onClickListener.onClick(view);
}
2021-12-17 21:59:34 +00:00
((e) this.k).dismiss();
2021-08-03 07:33:18 +00:00
} else if (i == 1) {
2021-12-17 21:59:34 +00:00
((e) this.k).dismiss();
2021-08-03 07:33:18 +00:00
} else {
throw null;
}
}
}
/* compiled from: ArgUtils.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes.dex */
2021-08-03 07:33:18 +00:00
public static final class b extends o implements Function0<SimpleConfirmationDialogArgs> {
public final /* synthetic */ String $argsKey;
public final /* synthetic */ AppDialog $this_args;
2022-03-07 09:34:54 +00:00
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
2021-08-03 07:33:18 +00:00
public b(AppDialog appDialog, String str) {
super(0);
this.$this_args = appDialog;
this.$argsKey = str;
}
@Override // kotlin.jvm.functions.Function0
2022-03-07 09:34:54 +00:00
public SimpleConfirmationDialogArgs invoke() {
2021-08-03 07:33:18 +00:00
Bundle arguments = this.$this_args.getArguments();
SimpleConfirmationDialogArgs simpleConfirmationDialogArgs = null;
Object obj = arguments != null ? arguments.get(this.$argsKey) : null;
if (obj instanceof SimpleConfirmationDialogArgs) {
simpleConfirmationDialogArgs = obj;
}
SimpleConfirmationDialogArgs simpleConfirmationDialogArgs2 = simpleConfirmationDialogArgs;
if (simpleConfirmationDialogArgs2 != null) {
return simpleConfirmationDialogArgs2;
}
2022-03-21 18:52:30 +00:00
StringBuilder R = b.d.b.a.a.R("Missing args for class type ");
b.d.b.a.a.j0(SimpleConfirmationDialogArgs.class, R, " + key ");
throw new IllegalStateException(b.d.b.a.a.G(R, this.$argsKey, '!'));
2021-08-03 07:33:18 +00:00
}
}
/* compiled from: SimpleConfirmationDialog.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes.dex */
2021-08-03 07:33:18 +00:00
public static final class c {
public c(DefaultConstructorMarker defaultConstructorMarker) {
}
2021-09-15 06:33:54 +00:00
2021-12-17 21:59:34 +00:00
public final e a(FragmentManager fragmentManager, SimpleConfirmationDialogArgs simpleConfirmationDialogArgs, View.OnClickListener onClickListener) {
2021-09-15 06:33:54 +00:00
m.checkNotNullParameter(fragmentManager, "fragmentManager");
m.checkNotNullParameter(simpleConfirmationDialogArgs, "args");
m.checkNotNullParameter(onClickListener, "positiveClickListener");
2021-12-17 21:59:34 +00:00
e eVar = new e();
2022-01-13 08:07:50 +00:00
eVar.setArguments(b.c.a.a0.d.e2(simpleConfirmationDialogArgs));
2021-12-17 21:59:34 +00:00
eVar.m = onClickListener;
eVar.show(fragmentManager, a0.getOrCreateKotlinClass(e.class).toString());
return eVar;
2021-09-15 06:33:54 +00:00
}
2021-08-03 07:33:18 +00:00
}
/* compiled from: SimpleConfirmationDialog.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes.dex */
2022-03-28 08:10:50 +00:00
public static final /* synthetic */ class d extends k implements Function1<View, o1> {
2021-12-17 21:59:34 +00:00
public static final d j = new d();
2021-08-03 07:33:18 +00:00
2021-12-17 21:59:34 +00:00
public d() {
2022-03-28 08:10:50 +00:00
super(1, o1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0);
2021-08-03 07:33:18 +00:00
}
@Override // kotlin.jvm.functions.Function1
2022-03-28 08:10:50 +00:00
public o1 invoke(View view) {
2021-08-03 07:33:18 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2021-12-02 18:53:44 +00:00
int i = R.id.notice_header_container;
LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.notice_header_container);
2021-08-03 07:33:18 +00:00
if (linearLayout != null) {
2021-12-02 18:53:44 +00:00
i = R.id.simple_confirmation_dialog_description;
TextView textView = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_description);
2021-08-03 07:33:18 +00:00
if (textView != null) {
2021-12-02 18:53:44 +00:00
i = R.id.simple_confirmation_dialog_negative;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_negative);
2021-08-03 07:33:18 +00:00
if (materialButton != null) {
2021-12-02 18:53:44 +00:00
i = R.id.simple_confirmation_dialog_positive;
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_positive);
2021-08-03 07:33:18 +00:00
if (materialButton2 != null) {
2021-12-02 18:53:44 +00:00
i = R.id.simple_confirmation_dialog_title;
TextView textView2 = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_title);
2021-08-03 07:33:18 +00:00
if (textView2 != null) {
2022-03-28 08:10:50 +00:00
return new o1((LinearLayout) view2, linearLayout, textView, materialButton, materialButton2, textView2);
2021-08-03 07:33:18 +00:00
}
}
}
}
}
2021-12-02 18:53:44 +00:00
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
2021-08-03 07:33:18 +00:00
}
}
2021-12-17 21:59:34 +00:00
public e() {
super(R.layout.simple_confirmation_dialog);
2021-08-03 07:33:18 +00:00
}
public final SimpleConfirmationDialogArgs g() {
2021-12-02 18:53:44 +00:00
return (SimpleConfirmationDialogArgs) this.l.getValue();
2021-08-03 07:33:18 +00:00
}
2022-03-28 08:10:50 +00:00
public final o1 h() {
return (o1) this.n.getValue((Fragment) this, j[0]);
2021-08-03 07:33:18 +00:00
}
@Override // com.discord.app.AppDialog
public void onViewBoundOrOnResume() {
super.onViewBoundOrOnResume();
requireDialog().setCanceledOnTouchOutside(true);
h().d.setOnClickListener(new a(0, this));
2021-12-02 18:53:44 +00:00
h().d.setText(g().l);
2021-12-17 21:59:34 +00:00
h().c.setOnClickListener(new a(1, this));
MaterialButton materialButton = h().c;
2021-08-03 07:33:18 +00:00
m.checkNotNullExpressionValue(materialButton, "binding.simpleConfirmationDialogNegative");
2021-12-02 18:53:44 +00:00
materialButton.setText(g().m);
2021-08-03 07:33:18 +00:00
TextView textView = h().e;
m.checkNotNullExpressionValue(textView, "binding.simpleConfirmationDialogTitle");
2021-12-17 21:59:34 +00:00
b.a.k.b.a(textView, g().j);
2022-03-28 08:10:50 +00:00
TextView textView2 = h().f171b;
2021-08-03 07:33:18 +00:00
m.checkNotNullExpressionValue(textView2, "binding.simpleConfirmationDialogDescription");
2021-12-17 21:59:34 +00:00
b.a.k.b.a(textView2, g().k);
2021-08-03 07:33:18 +00:00
}
}