57 lines
2.7 KiB
Java
57 lines
2.7 KiB
Java
|
package com.discord.widgets.friends;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import com.discord.utilities.error.Error;
|
||
|
import com.discord.utilities.rest.RestAPIAbortMessages;
|
||
|
import com.discord.utilities.user.UserUtils;
|
||
|
import d0.z.d.m;
|
||
|
import d0.z.d.o;
|
||
|
import kotlin.Unit;
|
||
|
import kotlin.jvm.functions.Function0;
|
||
|
import rx.functions.Action1;
|
||
|
/* compiled from: WidgetFriendsFindNearby.kt */
|
||
|
public final class WidgetFriendsFindNearby$sendFriendRequest$2<T> implements Action1<Error> {
|
||
|
public final /* synthetic */ int $discriminator;
|
||
|
public final /* synthetic */ String $username;
|
||
|
public final /* synthetic */ WidgetFriendsFindNearby this$0;
|
||
|
|
||
|
/* compiled from: WidgetFriendsFindNearby.kt */
|
||
|
/* renamed from: com.discord.widgets.friends.WidgetFriendsFindNearby$sendFriendRequest$2$1 reason: invalid class name */
|
||
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
||
|
public final /* synthetic */ Error $it;
|
||
|
public final /* synthetic */ WidgetFriendsFindNearby$sendFriendRequest$2 this$0;
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public AnonymousClass1(WidgetFriendsFindNearby$sendFriendRequest$2 widgetFriendsFindNearby$sendFriendRequest$2, Error error) {
|
||
|
super(0);
|
||
|
this.this$0 = widgetFriendsFindNearby$sendFriendRequest$2;
|
||
|
this.$it = error;
|
||
|
}
|
||
|
|
||
|
@Override // kotlin.jvm.functions.Function0
|
||
|
/* renamed from: invoke */
|
||
|
public final void mo1invoke() {
|
||
|
RestAPIAbortMessages.ResponseResolver responseResolver = RestAPIAbortMessages.ResponseResolver.INSTANCE;
|
||
|
Context context = this.this$0.this$0.getContext();
|
||
|
Error error = this.$it;
|
||
|
m.checkNotNullExpressionValue(error, "it");
|
||
|
Error.Response response = error.getResponse();
|
||
|
m.checkNotNullExpressionValue(response, "it.response");
|
||
|
int code = response.getCode();
|
||
|
c.a.d.o.h(this.this$0.this$0.getContext(), responseResolver.getRelationshipResponse(context, code, this.this$0.$username + '#' + UserUtils.INSTANCE.padDiscriminator(this.this$0.$discriminator)), 0, null, 12);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public WidgetFriendsFindNearby$sendFriendRequest$2(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i) {
|
||
|
this.this$0 = widgetFriendsFindNearby;
|
||
|
this.$username = str;
|
||
|
this.$discriminator = i;
|
||
|
}
|
||
|
|
||
|
public final void call(Error error) {
|
||
|
RestAPIAbortMessages restAPIAbortMessages = RestAPIAbortMessages.INSTANCE;
|
||
|
m.checkNotNullExpressionValue(error, "it");
|
||
|
RestAPIAbortMessages.handleAbortCodeOrDefault$default(restAPIAbortMessages, error, new AnonymousClass1(this, error), null, 4, null);
|
||
|
}
|
||
|
}
|