2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.auth;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import androidx.activity.result.ActivityResultLauncher;
|
2021-10-15 06:18:26 +00:00
|
|
|
import c0.t.u;
|
|
|
|
import c0.z.d.m;
|
|
|
|
import c0.z.d.o;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.utilities.error.Error;
|
|
|
|
import com.discord.utilities.view.validators.ValidationManager;
|
|
|
|
import com.discord.widgets.auth.WidgetAuthCaptcha;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: WidgetOauth2Authorize.kt */
|
|
|
|
public final class WidgetOauth2Authorize$authorizeApplication$1 extends o implements Function1<Error, Unit> {
|
|
|
|
public final /* synthetic */ WidgetOauth2Authorize this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public WidgetOauth2Authorize$authorizeApplication$1(WidgetOauth2Authorize widgetOauth2Authorize) {
|
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetOauth2Authorize;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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(Error error) {
|
|
|
|
invoke(error);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void invoke(Error error) {
|
|
|
|
m.checkNotNullParameter(error, "error");
|
|
|
|
WidgetAuthCaptcha.Companion companion = WidgetAuthCaptcha.Companion;
|
|
|
|
Context requireContext = this.this$0.requireContext();
|
|
|
|
ActivityResultLauncher<Intent> captchaLauncher = this.this$0.getCaptchaLauncher();
|
|
|
|
ValidationManager access$getValidationManager$p = WidgetOauth2Authorize.access$getValidationManager$p(this.this$0);
|
|
|
|
Error.Response response = error.getResponse();
|
|
|
|
m.checkNotNullExpressionValue(response, "error.response");
|
|
|
|
Map<String, List<String>> messages = response.getMessages();
|
|
|
|
m.checkNotNullExpressionValue(messages, "error.response.messages");
|
|
|
|
companion.processErrorsForCaptcha(requireContext, captchaLauncher, u.toMutableList((Collection) access$getValidationManager$p.setErrors(messages)), error);
|
|
|
|
}
|
|
|
|
}
|