127 lines
6.6 KiB
Java
127 lines
6.6 KiB
Java
|
package com.discord.stores;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import com.discord.models.domain.ModelVoiceRegion;
|
||
|
import com.discord.stores.StoreGuildVoiceRegions;
|
||
|
import com.discord.utilities.error.Error;
|
||
|
import com.discord.utilities.rest.RestAPI;
|
||
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
||
|
import d0.z.d.m;
|
||
|
import d0.z.d.o;
|
||
|
import java.util.List;
|
||
|
import kotlin.Unit;
|
||
|
import kotlin.jvm.functions.Function0;
|
||
|
import kotlin.jvm.functions.Function1;
|
||
|
/* compiled from: StoreGuildVoiceRegions.kt */
|
||
|
public final class StoreGuildVoiceRegions$fetchIfNonexisting$1 extends o implements Function0<Unit> {
|
||
|
public final /* synthetic */ long $guildId;
|
||
|
public final /* synthetic */ StoreGuildVoiceRegions this$0;
|
||
|
|
||
|
/* compiled from: StoreGuildVoiceRegions.kt */
|
||
|
/* renamed from: com.discord.stores.StoreGuildVoiceRegions$fetchIfNonexisting$1$1 reason: invalid class name */
|
||
|
public static final class AnonymousClass1 extends o implements Function1<List<? extends ModelVoiceRegion>, Unit> {
|
||
|
public final /* synthetic */ StoreGuildVoiceRegions$fetchIfNonexisting$1 this$0;
|
||
|
|
||
|
/* compiled from: StoreGuildVoiceRegions.kt */
|
||
|
/* renamed from: com.discord.stores.StoreGuildVoiceRegions$fetchIfNonexisting$1$1$1 reason: invalid class name */
|
||
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
||
|
public final /* synthetic */ List $voiceRegions;
|
||
|
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, List list) {
|
||
|
super(0);
|
||
|
this.this$0 = r1;
|
||
|
this.$voiceRegions = list;
|
||
|
}
|
||
|
|
||
|
@Override // kotlin.jvm.functions.Function0
|
||
|
/* renamed from: invoke */
|
||
|
public final void mo1invoke() {
|
||
|
StoreGuildVoiceRegions$fetchIfNonexisting$1 storeGuildVoiceRegions$fetchIfNonexisting$1 = this.this$0.this$0;
|
||
|
StoreGuildVoiceRegions.access$handleGuildVoiceRegions(storeGuildVoiceRegions$fetchIfNonexisting$1.this$0, storeGuildVoiceRegions$fetchIfNonexisting$1.$guildId, this.$voiceRegions);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public AnonymousClass1(StoreGuildVoiceRegions$fetchIfNonexisting$1 storeGuildVoiceRegions$fetchIfNonexisting$1) {
|
||
|
super(1);
|
||
|
this.this$0 = storeGuildVoiceRegions$fetchIfNonexisting$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 ModelVoiceRegion> list) {
|
||
|
invoke(list);
|
||
|
return Unit.a;
|
||
|
}
|
||
|
|
||
|
public final void invoke(List<? extends ModelVoiceRegion> list) {
|
||
|
m.checkNotNullParameter(list, "voiceRegions");
|
||
|
StoreGuildVoiceRegions.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, list));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: StoreGuildVoiceRegions.kt */
|
||
|
/* renamed from: com.discord.stores.StoreGuildVoiceRegions$fetchIfNonexisting$1$2 reason: invalid class name */
|
||
|
public static final class AnonymousClass2 extends o implements Function1<Error, Unit> {
|
||
|
public final /* synthetic */ StoreGuildVoiceRegions$fetchIfNonexisting$1 this$0;
|
||
|
|
||
|
/* compiled from: StoreGuildVoiceRegions.kt */
|
||
|
/* renamed from: com.discord.stores.StoreGuildVoiceRegions$fetchIfNonexisting$1$2$1 reason: invalid class name */
|
||
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
||
|
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) {
|
||
|
super(0);
|
||
|
this.this$0 = r1;
|
||
|
}
|
||
|
|
||
|
@Override // kotlin.jvm.functions.Function0
|
||
|
/* renamed from: invoke */
|
||
|
public final void mo1invoke() {
|
||
|
StoreGuildVoiceRegions$fetchIfNonexisting$1 storeGuildVoiceRegions$fetchIfNonexisting$1 = this.this$0.this$0;
|
||
|
StoreGuildVoiceRegions.access$handleGuildVoiceRegionsFetchFailed(storeGuildVoiceRegions$fetchIfNonexisting$1.this$0, storeGuildVoiceRegions$fetchIfNonexisting$1.$guildId);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public AnonymousClass2(StoreGuildVoiceRegions$fetchIfNonexisting$1 storeGuildVoiceRegions$fetchIfNonexisting$1) {
|
||
|
super(1);
|
||
|
this.this$0 = storeGuildVoiceRegions$fetchIfNonexisting$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");
|
||
|
StoreGuildVoiceRegions.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 StoreGuildVoiceRegions$fetchIfNonexisting$1(StoreGuildVoiceRegions storeGuildVoiceRegions, long j) {
|
||
|
super(0);
|
||
|
this.this$0 = storeGuildVoiceRegions;
|
||
|
this.$guildId = j;
|
||
|
}
|
||
|
|
||
|
@Override // kotlin.jvm.functions.Function0
|
||
|
/* renamed from: invoke */
|
||
|
public final void mo1invoke() {
|
||
|
StoreGuildVoiceRegions.State state = (StoreGuildVoiceRegions.State) StoreGuildVoiceRegions.access$getGuildVoiceRegionsState$p(this.this$0).get(Long.valueOf(this.$guildId));
|
||
|
if (!(state instanceof StoreGuildVoiceRegions.State.Loaded) && !(state instanceof StoreGuildVoiceRegions.State.Fetching)) {
|
||
|
StoreGuildVoiceRegions.access$handleGuildVoiceRegionsFetchStart(this.this$0, this.$guildId);
|
||
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().getGuildVoiceRegions(this.$guildId), false), this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass2(this), (Function0) null, (Function0) null, new AnonymousClass1(this), 54, (Object) null);
|
||
|
}
|
||
|
}
|
||
|
}
|