2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.settings.account;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import com.discord.api.auth.mfa.DisableMfaRequestBody;
|
|
|
|
import com.discord.api.auth.mfa.DisableMfaResponse;
|
|
|
|
import com.discord.stores.StoreMFA;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.utilities.rest.RestAPI;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import d0.z.d.o;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.functions.Function2;
|
|
|
|
/* compiled from: WidgetSettingsAccount.kt */
|
|
|
|
public final class WidgetSettingsAccount$showRemove2FAModal$1 extends o implements Function2<Context, String, Unit> {
|
|
|
|
public final /* synthetic */ WidgetSettingsAccount this$0;
|
|
|
|
|
|
|
|
/* compiled from: WidgetSettingsAccount.kt */
|
|
|
|
/* renamed from: com.discord.widgets.settings.account.WidgetSettingsAccount$showRemove2FAModal$1$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1 extends o implements Function1<DisableMfaResponse, Unit> {
|
|
|
|
public final /* synthetic */ WidgetSettingsAccount$showRemove2FAModal$1 this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public AnonymousClass1(WidgetSettingsAccount$showRemove2FAModal$1 widgetSettingsAccount$showRemove2FAModal$1) {
|
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetSettingsAccount$showRemove2FAModal$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(DisableMfaResponse disableMfaResponse) {
|
|
|
|
invoke(disableMfaResponse);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void invoke(DisableMfaResponse disableMfaResponse) {
|
|
|
|
m.checkNotNullParameter(disableMfaResponse, "it");
|
2021-08-06 20:07:13 +00:00
|
|
|
c.a.e.o.h(this.this$0.this$0.requireContext(), this.this$0.this$0.requireContext().getString(2131894804), 0, null, 12);
|
2021-08-03 07:33:18 +00:00
|
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
|
|
companion.getAuthentication().setAuthed(disableMfaResponse.a());
|
|
|
|
companion.getMFA().updatePendingMFAState(StoreMFA.MFAActivationState.PENDING_DISABLED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public WidgetSettingsAccount$showRemove2FAModal$1(WidgetSettingsAccount widgetSettingsAccount) {
|
|
|
|
super(2);
|
|
|
|
this.this$0 = widgetSettingsAccount;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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, java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
|
|
public /* bridge */ /* synthetic */ Unit invoke(Context context, String str) {
|
|
|
|
invoke(context, str);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void invoke(Context context, String str) {
|
|
|
|
m.checkNotNullParameter(context, "<anonymous parameter 0>");
|
|
|
|
m.checkNotNullParameter(str, "code");
|
|
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().disableMFA(new DisableMfaRequestBody(str)), this.this$0, null, 2, null), WidgetSettingsAccount.access$getBinding$p(this.this$0).d, 0, 2, null), false, 1, null), WidgetSettingsAccount.class, this.this$0.requireContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 60, (Object) null);
|
|
|
|
}
|
|
|
|
}
|