99 lines
5.2 KiB
Java
99 lines
5.2 KiB
Java
package com.discord.widgets.voice.call;
|
|
|
|
import android.content.Context;
|
|
import com.discord.app.AppFragment;
|
|
import com.discord.utilities.captcha.CaptchaErrorBody;
|
|
import com.discord.utilities.captcha.CaptchaHelper;
|
|
import com.discord.utilities.error.Error;
|
|
import com.discord.utilities.rest.RestAPIAbortMessages;
|
|
import com.discord.widgets.captcha.WidgetCaptchaBottomSheet;
|
|
import com.discord.widgets.captcha.WidgetCaptchaKt;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function2;
|
|
import rx.functions.Action1;
|
|
/* compiled from: WidgetCallFailed.kt */
|
|
public final class WidgetCallFailed$sendFriendRequest$2<T> implements Action1<Error> {
|
|
public final /* synthetic */ long $userId;
|
|
public final /* synthetic */ String $username;
|
|
public final /* synthetic */ WidgetCallFailed this$0;
|
|
|
|
/* compiled from: WidgetCallFailed.kt */
|
|
/* renamed from: com.discord.widgets.voice.call.WidgetCallFailed$sendFriendRequest$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ Error $error;
|
|
public final /* synthetic */ WidgetCallFailed$sendFriendRequest$2 this$0;
|
|
|
|
/* compiled from: WidgetCallFailed.kt */
|
|
/* renamed from: com.discord.widgets.voice.call.WidgetCallFailed$sendFriendRequest$2$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
|
|
public final /* synthetic */ AnonymousClass1 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(AnonymousClass1 r1) {
|
|
super(2);
|
|
this.this$0 = r1;
|
|
}
|
|
|
|
/* 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(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
|
|
invoke(appFragment, captchaPayload);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
|
|
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
|
|
m.checkNotNullParameter(captchaPayload, "captchaPayload");
|
|
WidgetCallFailed$sendFriendRequest$2 widgetCallFailed$sendFriendRequest$2 = this.this$0.this$0;
|
|
WidgetCallFailed.access$sendFriendRequest(widgetCallFailed$sendFriendRequest$2.this$0, widgetCallFailed$sendFriendRequest$2.$userId, widgetCallFailed$sendFriendRequest$2.$username, captchaPayload);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetCallFailed$sendFriendRequest$2 widgetCallFailed$sendFriendRequest$2, Error error) {
|
|
super(0);
|
|
this.this$0 = widgetCallFailed$sendFriendRequest$2;
|
|
this.$error = error;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
Error error = this.$error;
|
|
m.checkNotNullExpressionValue(error, "error");
|
|
if (WidgetCaptchaKt.isCaptchaError(error)) {
|
|
WidgetCaptchaBottomSheet.Companion companion = WidgetCaptchaBottomSheet.Companion;
|
|
AnonymousClass1 r4 = new AnonymousClass1(this);
|
|
CaptchaErrorBody.Companion companion2 = CaptchaErrorBody.Companion;
|
|
Error error2 = this.$error;
|
|
m.checkNotNullExpressionValue(error2, "error");
|
|
WidgetCaptchaBottomSheet.Companion.enqueue$default(companion, "Add Friend Captcha", r4, null, companion2.createFromError(error2), 4, null);
|
|
return;
|
|
}
|
|
RestAPIAbortMessages.ResponseResolver responseResolver = RestAPIAbortMessages.ResponseResolver.INSTANCE;
|
|
Context context = this.this$0.this$0.getContext();
|
|
Error error3 = this.$error;
|
|
m.checkNotNullExpressionValue(error3, "error");
|
|
Error.Response response = error3.getResponse();
|
|
m.checkNotNullExpressionValue(response, "error.response");
|
|
b.a.d.m.h(this.this$0.this$0.getContext(), responseResolver.getRelationshipResponse(context, response.getCode(), this.this$0.$username), 0, null, 12);
|
|
}
|
|
}
|
|
|
|
public WidgetCallFailed$sendFriendRequest$2(WidgetCallFailed widgetCallFailed, long j, String str) {
|
|
this.this$0 = widgetCallFailed;
|
|
this.$userId = j;
|
|
this.$username = str;
|
|
}
|
|
|
|
public final void call(Error error) {
|
|
RestAPIAbortMessages restAPIAbortMessages = RestAPIAbortMessages.INSTANCE;
|
|
m.checkNotNullExpressionValue(error, "error");
|
|
RestAPIAbortMessages.handleAbortCodeOrDefault$default(restAPIAbortMessages, error, new AnonymousClass1(this, error), null, 4, null);
|
|
}
|
|
}
|