2021-06-27 20:44:35 +00:00
|
|
|
package c.a.a;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
2021-08-10 21:50:53 +00:00
|
|
|
import androidx.fragment.app.FragmentViewModelLazyKt;
|
|
|
|
import c.a.a.p;
|
2021-08-24 17:45:16 +00:00
|
|
|
import c.a.d.f;
|
|
|
|
import c.a.d.f0;
|
|
|
|
import c.a.d.h0;
|
2021-10-19 23:48:27 +00:00
|
|
|
import c0.z.d.a0;
|
|
|
|
import c0.z.d.k;
|
|
|
|
import c0.z.d.m;
|
|
|
|
import c0.z.d.o;
|
2021-08-09 22:50:01 +00:00
|
|
|
import com.discord.R;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.discord.app.AppDialog;
|
2021-08-10 21:50:53 +00:00
|
|
|
import com.discord.app.AppViewModel;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
2021-08-10 21:50:53 +00:00
|
|
|
import com.google.android.material.button.MaterialButton;
|
|
|
|
import kotlin.Lazy;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
2021-06-27 20:44:35 +00:00
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
2021-08-10 21:50:53 +00:00
|
|
|
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
|
2021-06-27 20:44:35 +00:00
|
|
|
public final class h extends AppDialog {
|
2021-10-14 23:16:01 +00:00
|
|
|
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.Z(h.class, "binding", "getBinding()Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0)};
|
2021-06-27 20:44:35 +00:00
|
|
|
public static final b j = new b(null);
|
|
|
|
public final FragmentViewBindingDelegate k = FragmentViewBindingDelegateKt.viewBinding$default(this, c.i, null, 2, null);
|
2021-08-10 21:50:53 +00:00
|
|
|
public final Lazy l;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* compiled from: java-style lambda group */
|
|
|
|
public static final class a implements View.OnClickListener {
|
|
|
|
public final /* synthetic */ int i;
|
|
|
|
public final /* synthetic */ Object j;
|
|
|
|
|
2021-08-10 21:50:53 +00:00
|
|
|
public a(int i, Object obj) {
|
2021-06-27 20:44:35 +00:00
|
|
|
this.i = i;
|
|
|
|
this.j = obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
|
|
|
int i = this.i;
|
|
|
|
if (i == 0) {
|
2021-08-10 21:50:53 +00:00
|
|
|
h.g((h) this.j, false);
|
2021-06-27 20:44:35 +00:00
|
|
|
} else if (i == 1) {
|
2021-08-10 21:50:53 +00:00
|
|
|
h.g((h) this.j, true);
|
2021-06-27 20:44:35 +00:00
|
|
|
} else {
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-10 21:50:53 +00:00
|
|
|
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static final class b {
|
|
|
|
public b(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-10 21:50:53 +00:00
|
|
|
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
|
2021-08-24 17:45:16 +00:00
|
|
|
public static final /* synthetic */ class c extends k implements Function1<View, c.a.i.a> {
|
2021-06-27 20:44:35 +00:00
|
|
|
public static final c i = new c();
|
|
|
|
|
|
|
|
public c() {
|
2021-08-24 17:45:16 +00:00
|
|
|
super(1, c.a.i.a.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
2021-08-24 17:45:16 +00:00
|
|
|
public c.a.i.a invoke(View view) {
|
2021-06-27 20:44:35 +00:00
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
2021-08-10 21:50:53 +00:00
|
|
|
int i2 = R.id.accessibility_detection_body_text;
|
|
|
|
TextView textView = (TextView) view2.findViewById(R.id.accessibility_detection_body_text);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (textView != null) {
|
2021-08-10 21:50:53 +00:00
|
|
|
i2 = R.id.accessibility_detection_disable;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.accessibility_detection_disable);
|
|
|
|
if (materialButton != null) {
|
|
|
|
i2 = R.id.accessibility_detection_enable;
|
|
|
|
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.accessibility_detection_enable);
|
|
|
|
if (materialButton2 != null) {
|
|
|
|
i2 = R.id.view_dialog_confirmation_header;
|
|
|
|
TextView textView2 = (TextView) view2.findViewById(R.id.view_dialog_confirmation_header);
|
|
|
|
if (textView2 != null) {
|
2021-08-24 17:45:16 +00:00
|
|
|
return new c.a.i.a((LinearLayout) view2, textView, materialButton, materialButton2, textView2);
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-10 21:50:53 +00:00
|
|
|
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
|
|
|
|
public static final class d extends o implements Function0<AppViewModel<p.a>> {
|
|
|
|
public static final d i = new d();
|
|
|
|
|
|
|
|
public d() {
|
|
|
|
super(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
|
|
/* renamed from: invoke */
|
2021-10-19 23:48:27 +00:00
|
|
|
public AppViewModel<p.a> mo17invoke() {
|
2021-08-10 21:50:53 +00:00
|
|
|
return new p(null, null, 3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-27 20:44:35 +00:00
|
|
|
public h() {
|
2021-08-10 21:50:53 +00:00
|
|
|
super(R.layout.allow_accessibility_detection_dialog);
|
|
|
|
d dVar = d.i;
|
2021-08-24 17:45:16 +00:00
|
|
|
f0 f0Var = new f0(this);
|
2021-10-19 23:48:27 +00:00
|
|
|
this.l = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(p.class), new l(0, f0Var), new h0(dVar));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-08-10 21:50:53 +00:00
|
|
|
public static final void g(h hVar, boolean z2) {
|
|
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(((p) hVar.l.getValue()).i.setIsAccessibilityDetectionAllowed(z2), false, 1, null), p.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, q.i, 62, (Object) null);
|
|
|
|
hVar.dismiss();
|
|
|
|
}
|
|
|
|
|
2021-08-24 17:45:16 +00:00
|
|
|
public final c.a.i.a h() {
|
|
|
|
return (c.a.i.a) this.k.getValue((Fragment) this, i[0]);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBound(View view) {
|
|
|
|
m.checkNotNullParameter(view, "view");
|
|
|
|
super.onViewBound(view);
|
2021-10-19 23:48:27 +00:00
|
|
|
h().f62c.setOnClickListener(new a(0, this));
|
2021-08-10 21:50:53 +00:00
|
|
|
h().d.setOnClickListener(new a(1, this));
|
|
|
|
TextView textView = h().b;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.accessibilityDetectionBodyText");
|
2021-08-24 17:45:16 +00:00
|
|
|
c.a.k.b.n(textView, R.string.accessibility_detection_modal_body, new Object[]{f.a.a(360035966492L, null)}, null, 4);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|