discord-jadx/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventDetailsV...

44 lines
2.3 KiB
Java

package com.discord.widgets.guildscheduledevent;
import com.discord.api.channel.Channel;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.stores.StoreChannels;
import com.discord.stores.StoreGuildScheduledEvents;
import com.discord.stores.StoreGuilds;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventDetailsViewModel;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventDetailsViewModel.kt */
public final class GuildScheduledEventDetailsViewModel$Companion$observeStores$1 extends o implements Function0<GuildScheduledEventDetailsViewModel.StoreState> {
public final /* synthetic */ StoreChannels $channelsStore;
public final /* synthetic */ long $guildScheduledEventId;
public final /* synthetic */ StoreGuildScheduledEvents $guildScheduledEventsStore;
public final /* synthetic */ StoreGuilds $guildsStore;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventDetailsViewModel$Companion$observeStores$1(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, StoreChannels storeChannels, StoreGuilds storeGuilds) {
super(0);
this.$guildScheduledEventsStore = storeGuildScheduledEvents;
this.$guildScheduledEventId = j;
this.$channelsStore = storeChannels;
this.$guildsStore = storeGuilds;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final GuildScheduledEventDetailsViewModel.StoreState mo1invoke() {
Channel channel;
GuildScheduledEvent findEventFromStore$default = StoreGuildScheduledEvents.findEventFromStore$default(this.$guildScheduledEventsStore, this.$guildScheduledEventId, null, 2, null);
if (findEventFromStore$default == null) {
return new GuildScheduledEventDetailsViewModel.StoreState(null, null, null, false, 15, null);
}
Long b = findEventFromStore$default.b();
if (b != null) {
channel = this.$channelsStore.getChannel(b.longValue());
} else {
channel = null;
}
return new GuildScheduledEventDetailsViewModel.StoreState(findEventFromStore$default, channel, this.$guildsStore.getGuild(findEventFromStore$default.f()), this.$guildScheduledEventsStore.isRsvpedToEvent(this.$guildScheduledEventId));
}
}