discord-jadx/app/src/main/java/com/discord/stores/StorePaymentSources$fetchPa...

151 lines
7.5 KiB
Java

package com.discord.stores;
import android.content.Context;
import com.discord.models.domain.ModelPaymentSource;
import com.discord.models.domain.PaymentSourceRaw;
import com.discord.stores.StorePaymentSources;
import com.discord.utilities.error.Error;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.m;
import d0.z.d.o;
import j0.k.b;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.Observable;
/* compiled from: StorePaymentSources.kt */
public final class StorePaymentSources$fetchPaymentSources$1 extends o implements Function0<Unit> {
public final /* synthetic */ StorePaymentSources this$0;
/* compiled from: StorePaymentSources.kt */
/* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$1 reason: invalid class name */
public static final class AnonymousClass1<T, R> implements b<List<? extends PaymentSourceRaw>, List<? extends ModelPaymentSource>> {
public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0;
public AnonymousClass1(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) {
this.this$0 = storePaymentSources$fetchPaymentSources$1;
}
/* 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 // j0.k.b
public /* bridge */ /* synthetic */ List<? extends ModelPaymentSource> call(List<? extends PaymentSourceRaw> list) {
return call((List<PaymentSourceRaw>) list);
}
public final List<ModelPaymentSource> call(List<PaymentSourceRaw> list) {
StorePaymentSources storePaymentSources = this.this$0.this$0;
m.checkNotNullExpressionValue(list, "it");
return StorePaymentSources.access$ensureDefaultPaymentSource(storePaymentSources, list);
}
}
/* compiled from: StorePaymentSources.kt */
/* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<List<? extends ModelPaymentSource>, Unit> {
public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0;
/* compiled from: StorePaymentSources.kt */
/* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ List $paymentSources;
public final /* synthetic */ AnonymousClass2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass2 r1, List list) {
super(0);
this.this$0 = r1;
this.$paymentSources = list;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StorePaymentSources storePaymentSources = this.this$0.this$0.this$0;
List list = this.$paymentSources;
m.checkNotNullExpressionValue(list, "paymentSources");
StorePaymentSources.access$handlePaymentSourcesFetchSuccess(storePaymentSources, list);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) {
super(1);
this.this$0 = storePaymentSources$fetchPaymentSources$1;
}
/* 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(List<? extends ModelPaymentSource> list) {
invoke(list);
return Unit.a;
}
public final void invoke(List<? extends ModelPaymentSource> list) {
StorePaymentSources.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, list));
}
}
/* compiled from: StorePaymentSources.kt */
/* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0;
/* compiled from: StorePaymentSources.kt */
/* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ AnonymousClass3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass3 r1) {
super(0);
this.this$0 = r1;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StorePaymentSources.access$handlePaymentSourcesFetchFailure(this.this$0.this$0.this$0);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) {
super(1);
this.this$0 = storePaymentSources$fetchPaymentSources$1;
}
/* 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, "it");
StorePaymentSources.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this));
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StorePaymentSources$fetchPaymentSources$1(StorePaymentSources storePaymentSources) {
super(0);
this.this$0 = storePaymentSources;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
if (!(StorePaymentSources.access$getPaymentSourcesState$p(this.this$0) instanceof StorePaymentSources.PaymentSourcesState.Loading)) {
StorePaymentSources.access$handlePaymentSourcesFetchStart(this.this$0);
Observable F = ObservableExtensionsKt.restSubscribeOn$default(StorePaymentSources.access$getRestAPI$p(this.this$0).getPaymentSources(), false, 1, null).F(new AnonymousClass1(this));
m.checkNotNullExpressionValue(F, "restAPI\n .getPa…efaultPaymentSource(it) }");
ObservableExtensionsKt.appSubscribe$default(F, this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass3(this), (Function0) null, (Function0) null, new AnonymousClass2(this), 54, (Object) null);
}
}
}