2021-09-30 06:24:59 +00:00
|
|
|
package com.discord.widgets.guildscheduledevent;
|
|
|
|
|
2021-10-15 06:18:26 +00:00
|
|
|
import c0.f0.q;
|
|
|
|
import c0.t.i0;
|
|
|
|
import c0.z.d.m;
|
|
|
|
import c0.z.d.o;
|
2021-09-30 06:24:59 +00:00
|
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
|
|
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
|
|
|
|
import com.discord.stores.StoreGuildScheduledEvents;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Set;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: GuildIdsWithActiveEventsModel.kt */
|
|
|
|
public final class GuildIdsWithActiveEventsModel$observe$1 extends o implements Function0<Set<? extends Long>> {
|
|
|
|
public final /* synthetic */ StoreGuildScheduledEvents $storeGuildScheduledEvents;
|
|
|
|
|
|
|
|
/* compiled from: GuildIdsWithActiveEventsModel.kt */
|
|
|
|
/* renamed from: com.discord.widgets.guildscheduledevent.GuildIdsWithActiveEventsModel$observe$1$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1 extends o implements Function1<Map.Entry<? extends Long, ? extends List<? extends GuildScheduledEvent>>, Boolean> {
|
|
|
|
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
|
|
|
|
|
|
|
|
public AnonymousClass1() {
|
|
|
|
super(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 */ Boolean invoke(Map.Entry<? extends Long, ? extends List<? extends GuildScheduledEvent>> entry) {
|
|
|
|
return Boolean.valueOf(invoke((Map.Entry<Long, ? extends List<GuildScheduledEvent>>) entry));
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean invoke(Map.Entry<Long, ? extends List<GuildScheduledEvent>> entry) {
|
|
|
|
boolean z2;
|
|
|
|
m.checkNotNullParameter(entry, "<name for destructuring parameter 0>");
|
|
|
|
List<GuildScheduledEvent> list = (List) entry.getValue();
|
|
|
|
if (!(list instanceof Collection) || !list.isEmpty()) {
|
|
|
|
for (GuildScheduledEvent guildScheduledEvent : list) {
|
|
|
|
if (guildScheduledEvent.k() == GuildScheduledEventStatus.ACTIVE) {
|
|
|
|
z2 = true;
|
|
|
|
continue;
|
|
|
|
} else {
|
|
|
|
z2 = false;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (z2) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: GuildIdsWithActiveEventsModel.kt */
|
|
|
|
/* renamed from: com.discord.widgets.guildscheduledevent.GuildIdsWithActiveEventsModel$observe$1$2 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass2 extends o implements Function1<Map.Entry<? extends Long, ? extends List<? extends GuildScheduledEvent>>, Long> {
|
|
|
|
public static final AnonymousClass2 INSTANCE = new AnonymousClass2();
|
|
|
|
|
|
|
|
public AnonymousClass2() {
|
|
|
|
super(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final long invoke(Map.Entry<Long, ? extends List<GuildScheduledEvent>> entry) {
|
|
|
|
m.checkNotNullParameter(entry, "entry");
|
|
|
|
return entry.getKey().longValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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 */ Long invoke(Map.Entry<? extends Long, ? extends List<? extends GuildScheduledEvent>> entry) {
|
|
|
|
return Long.valueOf(invoke((Map.Entry<Long, ? extends List<GuildScheduledEvent>>) entry));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public GuildIdsWithActiveEventsModel$observe$1(StoreGuildScheduledEvents storeGuildScheduledEvents) {
|
|
|
|
super(0);
|
|
|
|
this.$storeGuildScheduledEvents = storeGuildScheduledEvents;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.util.Set<java.lang.Long>' to match base method */
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
|
|
/* renamed from: invoke */
|
2021-10-15 06:18:26 +00:00
|
|
|
public final Set<? extends Long> mo17invoke() {
|
2021-09-30 06:24:59 +00:00
|
|
|
return q.toSet(q.map(q.filter(i0.asSequence(this.$storeGuildScheduledEvents.getAllGuildScheduledEvents()), AnonymousClass1.INSTANCE), AnonymousClass2.INSTANCE));
|
|
|
|
}
|
|
|
|
}
|