78 lines
3.6 KiB
Java
78 lines
3.6 KiB
Java
package com.discord.widgets.friends;
|
|
|
|
import com.discord.utilities.error.Error;
|
|
import com.discord.utilities.rest.RestAPIAbortMessages;
|
|
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: FriendsListViewModel.kt */
|
|
public final class FriendsListViewModel$acceptFriendRequest$2 extends o implements Function1<Error, Unit> {
|
|
public final /* synthetic */ String $username;
|
|
public final /* synthetic */ FriendsListViewModel this$0;
|
|
|
|
/* compiled from: FriendsListViewModel.kt */
|
|
/* renamed from: com.discord.widgets.friends.FriendsListViewModel$acceptFriendRequest$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ Error $error;
|
|
public final /* synthetic */ FriendsListViewModel$acceptFriendRequest$2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(FriendsListViewModel$acceptFriendRequest$2 friendsListViewModel$acceptFriendRequest$2, Error error) {
|
|
super(0);
|
|
this.this$0 = friendsListViewModel$acceptFriendRequest$2;
|
|
this.$error = error;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
FriendsListViewModel friendsListViewModel = this.this$0.this$0;
|
|
Error.Response response = this.$error.getResponse();
|
|
m.checkNotNullExpressionValue(response, "error.response");
|
|
FriendsListViewModel.access$emitShowFriendRequestAbortToast(friendsListViewModel, response.getCode(), this.this$0.$username);
|
|
}
|
|
}
|
|
|
|
/* compiled from: FriendsListViewModel.kt */
|
|
/* renamed from: com.discord.widgets.friends.FriendsListViewModel$acceptFriendRequest$2$2 reason: invalid class name */
|
|
public static final class AnonymousClass2 extends o implements Function0<Boolean> {
|
|
public final /* synthetic */ FriendsListViewModel$acceptFriendRequest$2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass2(FriendsListViewModel$acceptFriendRequest$2 friendsListViewModel$acceptFriendRequest$2) {
|
|
super(0);
|
|
this.this$0 = friendsListViewModel$acceptFriendRequest$2;
|
|
}
|
|
|
|
/* Return type fixed from 'boolean' to match base method */
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final Boolean mo1invoke() {
|
|
FriendsListViewModel.access$emitShowToastEvent(this.this$0.this$0, 2131888048);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public FriendsListViewModel$acceptFriendRequest$2(FriendsListViewModel friendsListViewModel, String str) {
|
|
super(1);
|
|
this.this$0 = friendsListViewModel;
|
|
this.$username = str;
|
|
}
|
|
|
|
/* 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");
|
|
RestAPIAbortMessages.INSTANCE.handleAbortCodeOrDefault(error, new AnonymousClass1(this, error), new AnonymousClass2(this));
|
|
}
|
|
}
|