discord-jadx/app/src/main/java/com/discord/widgets/stage/start/StartStageServerSelectionVi...

79 lines
3.8 KiB
Java

package com.discord.widgets.stage.start;
import c.d.b.a.a;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel;
import com.discord.api.stageinstance.StageInstance;
import com.discord.models.guild.Guild;
import com.discord.stores.StoreChannels;
import com.discord.widgets.stage.start.StartStageServerSelectionViewModel;
import d0.z.d.m;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.Pair;
import rx.functions.Func4;
/* compiled from: StartStageServerSelectionViewModel.kt */
public final class StartStageServerSelectionViewModel$Companion$observeStoreState$1<T1, T2, T3, T4, R> implements Func4<Map<Long, ? extends Guild>, Map<Long, ? extends List<? extends Long>>, Map<Long, ? extends Map<Long, ? extends Long>>, Map<Long, ? extends StageInstance>, StartStageServerSelectionViewModel.StoreState> {
public final /* synthetic */ StoreChannels $channelsStore;
public StartStageServerSelectionViewModel$Companion$observeStoreState$1(StoreChannels storeChannels) {
this.$channelsStore = storeChannels;
}
/* JADX WARNING: Removed duplicated region for block: B:34:0x0076 A[EDGE_INSN: B:34:0x0076->B:19:0x0076 ?: BREAK , SYNTHETIC] */
public final StartStageServerSelectionViewModel.StoreState call(Map<Long, Guild> map, Map<Long, ? extends List<Long>> map2, Map<Long, ? extends Map<Long, Long>> map3, Map<Long, StageInstance> map4) {
Pair pair;
Object obj;
Guild guild;
Map map5;
Long l;
Set<Long> keySet = map.keySet();
ArrayList arrayList = new ArrayList();
for (Number number : keySet) {
long longValue = number.longValue();
Iterator<T> it = this.$channelsStore.getChannelsForGuild(longValue).values().iterator();
while (true) {
pair = null;
if (!it.hasNext()) {
obj = null;
break;
}
obj = it.next();
Channel channel = (Channel) obj;
boolean z2 = true;
if (AnimatableValueParser.w1(channel) && (map5 = (Map) map3.get(Long.valueOf(longValue))) != null && (l = (Long) a.o0(channel, map5)) != null && AnimatableValueParser.S0(l, 20971536)) {
m.checkNotNullExpressionValue(map4, "stageInstances");
if (!map4.containsKey(Long.valueOf(channel.h()))) {
continue;
if (z2) {
break;
}
}
}
z2 = false;
continue;
if (z2) {
}
}
Channel channel2 = (Channel) obj;
if (!(channel2 == null || (guild = map.get(Long.valueOf(longValue))) == null)) {
pair = new Pair(guild, channel2);
}
if (pair != null) {
arrayList.add(pair);
}
}
return new StartStageServerSelectionViewModel.StoreState(arrayList);
}
/* 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, java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // rx.functions.Func4
public /* bridge */ /* synthetic */ StartStageServerSelectionViewModel.StoreState call(Map<Long, ? extends Guild> map, Map<Long, ? extends List<? extends Long>> map2, Map<Long, ? extends Map<Long, ? extends Long>> map3, Map<Long, ? extends StageInstance> map4) {
return call((Map<Long, Guild>) map, (Map<Long, ? extends List<Long>>) map2, (Map<Long, ? extends Map<Long, Long>>) map3, (Map<Long, StageInstance>) map4);
}
}