discord-jadx/app/src/main/java/c/a/a/g.java

142 lines
5.6 KiB
Java

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;
import androidx.fragment.app.FragmentViewModelLazyKt;
import c.a.a.o;
import c.a.d.f;
import c.a.d.h0;
import c.a.d.j0;
import com.discord.app.AppDialog;
import com.discord.app.AppViewModel;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
import com.google.android.material.button.MaterialButton;
import d0.z.d.a0;
import d0.z.d.k;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
public final class g extends AppDialog {
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.W(g.class, "binding", "getBinding()Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0)};
public static final b j = new b(null);
public final FragmentViewBindingDelegate k = FragmentViewBindingDelegateKt.viewBinding$default(this, c.i, null, 2, null);
public final Lazy l;
/* compiled from: java-style lambda group */
public static final class a implements View.OnClickListener {
public final /* synthetic */ int i;
public final /* synthetic */ Object j;
public a(int i, Object obj) {
this.i = i;
this.j = obj;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
int i = this.i;
if (i == 0) {
g.g((g) this.j, false);
} else if (i == 1) {
g.g((g) this.j, true);
} else {
throw null;
}
}
}
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
}
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
public static final /* synthetic */ class c extends k implements Function1<View, c.a.i.a> {
public static final c i = new c();
public c() {
super(1, c.a.i.a.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0);
}
/* 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
public c.a.i.a invoke(View view) {
View view2 = view;
m.checkNotNullParameter(view2, "p1");
int i2 = 2131361856;
TextView textView = (TextView) view2.findViewById(2131361856);
if (textView != null) {
i2 = 2131361857;
MaterialButton materialButton = (MaterialButton) view2.findViewById(2131361857);
if (materialButton != null) {
i2 = 2131361858;
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(2131361858);
if (materialButton2 != null) {
i2 = 2131365491;
TextView textView2 = (TextView) view2.findViewById(2131365491);
if (textView2 != null) {
return new c.a.i.a((LinearLayout) view2, textView, materialButton, materialButton2, textView2);
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
}
}
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
public static final class d extends o implements Function0<AppViewModel<o.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 */
public AppViewModel<o.a> mo1invoke() {
return new o(null, null, 3);
}
}
public g() {
super(2131558431);
d dVar = d.i;
h0 h0Var = new h0(this);
this.l = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(o.class), new m(0, h0Var), new j0(dVar));
}
public static final void g(g gVar, boolean z2) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(((o) gVar.l.getValue()).i.setIsAccessibilityDetectionAllowed(z2), false, 1, null), o.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, p.i, 62, (Object) null);
gVar.dismiss();
}
public final c.a.i.a h() {
return (c.a.i.a) this.k.getValue((Fragment) this, i[0]);
}
@Override // com.discord.app.AppDialog
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
h().f59c.setOnClickListener(new a(0, this));
h().d.setOnClickListener(new a(1, this));
TextView textView = h().b;
m.checkNotNullExpressionValue(textView, "binding.accessibilityDetectionBodyText");
c.a.l.b.n(textView, 2131886119, new Object[]{f.a.a(360035966492L, null)}, null, 4);
}
}