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

144 lines
5.7 KiB
Java
Raw Normal View History

2021-12-17 22:01:24 +00:00
package b.a.a;
2021-07-24 02:37:17 +00:00
import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
2021-08-03 07:33:18 +00:00
import androidx.fragment.app.FragmentViewModelLazyKt;
2021-12-17 22:01:24 +00:00
import b.a.a.p;
import b.a.d.f;
import b.a.d.f0;
import b.a.d.h0;
import com.discord.R;
2021-07-24 02:37:17 +00:00
import com.discord.app.AppDialog;
2021-08-03 07:33:18 +00:00
import com.discord.app.AppViewModel;
import com.discord.utilities.rx.ObservableExtensionsKt;
2021-07-24 02:37:17 +00:00
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
2021-08-03 07:33:18 +00:00
import com.google.android.material.button.MaterialButton;
2021-11-01 07:19:03 +00:00
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;
2021-07-24 02:37:17 +00:00
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
2021-08-03 07:33:18 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-07-24 02:37:17 +00:00
public final class h extends AppDialog {
2021-12-17 22:01:24 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(h.class, "binding", "getBinding()Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0)};
public static final b k = new b(null);
public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, c.j, null, 2, null);
public final Lazy m;
2021-07-24 02:37:17 +00:00
/* compiled from: java-style lambda group */
2022-03-07 09:36:12 +00:00
/* loaded from: classes2.dex */
2021-07-24 02:37:17 +00:00
public static final class a implements View.OnClickListener {
2021-12-17 22:01:24 +00:00
public final /* synthetic */ int j;
public final /* synthetic */ Object k;
2021-07-24 02:37:17 +00:00
2021-08-03 07:33:18 +00:00
public a(int i, Object obj) {
2021-12-17 22:01:24 +00:00
this.j = i;
this.k = obj;
2021-07-24 02:37:17 +00:00
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
2021-12-17 22:01:24 +00:00
int i = this.j;
2021-07-24 02:37:17 +00:00
if (i == 0) {
2021-12-17 22:01:24 +00:00
h.g((h) this.k, false);
2021-07-24 02:37:17 +00:00
} else if (i == 1) {
2021-12-17 22:01:24 +00:00
h.g((h) this.k, true);
2021-07-24 02:37:17 +00:00
} else {
throw null;
}
}
}
2021-08-03 07:33:18 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-07-24 02:37:17 +00:00
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
}
2021-08-03 07:33:18 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-12-17 22:01:24 +00:00
public static final /* synthetic */ class c extends k implements Function1<View, b.a.i.a> {
public static final c j = new c();
2021-07-24 02:37:17 +00:00
public c() {
2021-12-17 22:01:24 +00:00
super(1, b.a.i.a.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0);
2021-07-24 02:37:17 +00:00
}
@Override // kotlin.jvm.functions.Function1
2021-12-17 22:01:24 +00:00
public b.a.i.a invoke(View view) {
2021-07-24 02:37:17 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2021-12-17 22:01:24 +00:00
int i = R.id.accessibility_detection_body_text;
TextView textView = (TextView) view2.findViewById(R.id.accessibility_detection_body_text);
2021-07-24 02:37:17 +00:00
if (textView != null) {
2021-12-17 22:01:24 +00:00
i = R.id.accessibility_detection_disable;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.accessibility_detection_disable);
2021-08-03 07:33:18 +00:00
if (materialButton != null) {
2021-12-17 22:01:24 +00:00
i = R.id.accessibility_detection_enable;
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.accessibility_detection_enable);
2021-08-03 07:33:18 +00:00
if (materialButton2 != null) {
2021-12-17 22:01:24 +00:00
i = R.id.view_dialog_confirmation_header;
TextView textView2 = (TextView) view2.findViewById(R.id.view_dialog_confirmation_header);
2021-08-03 07:33:18 +00:00
if (textView2 != null) {
2021-12-17 22:01:24 +00:00
return new b.a.i.a((LinearLayout) view2, textView, materialButton, materialButton2, textView2);
2021-08-03 07:33:18 +00:00
}
2021-07-24 02:37:17 +00:00
}
}
}
2021-12-17 22:01:24 +00:00
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
2021-07-24 02:37:17 +00:00
}
}
2021-08-03 07:33:18 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-08-03 07:33:18 +00:00
public static final class d extends o implements Function0<AppViewModel<p.a>> {
2021-12-17 22:01:24 +00:00
public static final d j = new d();
2021-08-03 07:33:18 +00:00
public d() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
2022-03-01 22:12:19 +00:00
public AppViewModel<p.a> invoke() {
2021-08-03 07:33:18 +00:00
return new p(null, null, 3);
}
}
2021-07-24 02:37:17 +00:00
public h() {
super(R.layout.allow_accessibility_detection_dialog);
2021-12-17 22:01:24 +00:00
d dVar = d.j;
2021-08-18 07:29:27 +00:00
f0 f0Var = new f0(this);
2021-12-17 22:01:24 +00:00
this.m = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(p.class), new k(0, f0Var), new h0(dVar));
2021-07-24 02:37:17 +00:00
}
2021-08-03 07:33:18 +00:00
public static final void g(h hVar, boolean z2) {
2021-12-17 22:01:24 +00:00
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(((p) hVar.m.getValue()).j.setIsAccessibilityDetectionAllowed(z2), false, 1, null), p.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, q.j, 62, (Object) null);
2021-08-03 07:33:18 +00:00
hVar.dismiss();
}
2021-12-17 22:01:24 +00:00
public final b.a.i.a h() {
return (b.a.i.a) this.l.getValue((Fragment) this, j[0]);
2021-07-24 02:37:17 +00:00
}
@Override // com.discord.app.AppDialog
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
2021-12-17 22:01:24 +00:00
h().c.setOnClickListener(new a(0, this));
2021-08-03 07:33:18 +00:00
h().d.setOnClickListener(new a(1, this));
2021-12-17 22:01:24 +00:00
TextView textView = h().f72b;
2021-08-03 07:33:18 +00:00
m.checkNotNullExpressionValue(textView, "binding.accessibilityDetectionBodyText");
2021-12-17 22:01:24 +00:00
b.a.k.b.n(textView, R.string.accessibility_detection_modal_body, new Object[]{f.a.a(360035966492L, null)}, null, 4);
2021-07-24 02:37:17 +00:00
}
}