59 lines
3.1 KiB
Java
59 lines
3.1 KiB
Java
package com.discord.widgets.servers;
|
|
|
|
import android.view.View;
|
|
import com.discord.restapi.RestAPIParams;
|
|
import com.discord.utilities.rest.RestAPI;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import com.discord.utilities.view.extensions.ViewExtensions;
|
|
import com.discord.widgets.servers.WidgetServerSettingsSecurity;
|
|
import com.google.android.material.textfield.TextInputLayout;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetServerSettingsSecurity.kt */
|
|
public final class WidgetServerSettingsSecurity$ToggleMfaDialog$configure$1 implements View.OnClickListener {
|
|
public final /* synthetic */ long $guildId;
|
|
public final /* synthetic */ boolean $mfaEnabled;
|
|
public final /* synthetic */ WidgetServerSettingsSecurity.ToggleMfaDialog this$0;
|
|
|
|
/* compiled from: WidgetServerSettingsSecurity.kt */
|
|
/* renamed from: com.discord.widgets.servers.WidgetServerSettingsSecurity$ToggleMfaDialog$configure$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function1<Void, Unit> {
|
|
public final /* synthetic */ WidgetServerSettingsSecurity$ToggleMfaDialog$configure$1 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetServerSettingsSecurity$ToggleMfaDialog$configure$1 widgetServerSettingsSecurity$ToggleMfaDialog$configure$1) {
|
|
super(1);
|
|
this.this$0 = widgetServerSettingsSecurity$ToggleMfaDialog$configure$1;
|
|
}
|
|
|
|
/* 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 /* bridge */ /* synthetic */ Unit invoke(Void r1) {
|
|
invoke(r1);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(Void r1) {
|
|
this.this$0.this$0.dismiss();
|
|
}
|
|
}
|
|
|
|
public WidgetServerSettingsSecurity$ToggleMfaDialog$configure$1(WidgetServerSettingsSecurity.ToggleMfaDialog toggleMfaDialog, boolean z2, long j) {
|
|
this.this$0 = toggleMfaDialog;
|
|
this.$mfaEnabled = z2;
|
|
this.$guildId = j;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
int i = !this.$mfaEnabled ? 1 : 0;
|
|
TextInputLayout textInputLayout = WidgetServerSettingsSecurity.ToggleMfaDialog.access$getBinding$p(this.this$0).d;
|
|
m.checkNotNullExpressionValue(textInputLayout, "binding.serverSettingsSecurityServerMfaCode");
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().setMfaLevel(this.$guildId, new RestAPIParams.GuildMFA(i, ViewExtensions.getTextOrEmpty(textInputLayout))), false, 1, null), this.this$0, null, 2, null), this.this$0.getClass(), this.this$0.getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 60, (Object) null);
|
|
}
|
|
}
|