68 lines
3.3 KiB
Java
68 lines
3.3 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.app.AppLog;
|
|
import com.discord.stores.StoreGifting;
|
|
import com.discord.utilities.error.Error;
|
|
import com.discord.utilities.logging.Logger;
|
|
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: StoreGifting.kt */
|
|
public final class StoreGifting$fetchMyGiftsForSku$2 extends o implements Function1<Error, Unit> {
|
|
public final /* synthetic */ String $comboId;
|
|
public final /* synthetic */ StoreGifting this$0;
|
|
|
|
/* compiled from: StoreGifting.kt */
|
|
/* renamed from: com.discord.stores.StoreGifting$fetchMyGiftsForSku$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ Error $error;
|
|
public final /* synthetic */ StoreGifting$fetchMyGiftsForSku$2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(StoreGifting$fetchMyGiftsForSku$2 storeGifting$fetchMyGiftsForSku$2, Error error) {
|
|
super(0);
|
|
this.this$0 = storeGifting$fetchMyGiftsForSku$2;
|
|
this.$error = error;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
int ordinal = this.$error.getType().ordinal();
|
|
if (ordinal == 3) {
|
|
this.$error.setShowErrorToasts(false);
|
|
StoreGifting$fetchMyGiftsForSku$2 storeGifting$fetchMyGiftsForSku$2 = this.this$0;
|
|
StoreGifting.access$setGifts(storeGifting$fetchMyGiftsForSku$2.this$0, storeGifting$fetchMyGiftsForSku$2.$comboId, StoreGifting.GiftState.Invalid.INSTANCE);
|
|
} else if (ordinal != 11) {
|
|
Logger.e$default(AppLog.g, "Fetching Gift Error", new Exception(String.valueOf(this.$error.getType())), null, 4, null);
|
|
StoreGifting$fetchMyGiftsForSku$2 storeGifting$fetchMyGiftsForSku$22 = this.this$0;
|
|
StoreGifting.access$setGifts(storeGifting$fetchMyGiftsForSku$22.this$0, storeGifting$fetchMyGiftsForSku$22.$comboId, StoreGifting.GiftState.LoadFailed.INSTANCE);
|
|
} else {
|
|
StoreGifting$fetchMyGiftsForSku$2 storeGifting$fetchMyGiftsForSku$23 = this.this$0;
|
|
StoreGifting.access$setGifts(storeGifting$fetchMyGiftsForSku$23.this$0, storeGifting$fetchMyGiftsForSku$23.$comboId, StoreGifting.GiftState.LoadFailed.INSTANCE);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public StoreGifting$fetchMyGiftsForSku$2(StoreGifting storeGifting, String str) {
|
|
super(1);
|
|
this.this$0 = storeGifting;
|
|
this.$comboId = 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");
|
|
this.this$0.getDispatcher().schedule(new AnonymousClass1(this, error));
|
|
}
|
|
}
|