discord-jadx/app/src/main/java/com/discord/widgets/channels/list/WidgetChannelListModel.java

767 lines
35 KiB
Java

package com.discord.widgets.channels.list;
import c.d.b.a.a;
import com.discord.api.channel.Channel;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
import com.discord.api.permission.Permission;
import com.discord.api.stageinstance.StageInstance;
import com.discord.api.voice.state.VoiceState;
import com.discord.models.domain.ModelApplicationStream;
import com.discord.models.guild.Guild;
import com.discord.models.guild.UserGuildMember;
import com.discord.models.member.GuildMember;
import com.discord.models.user.User;
import com.discord.stores.StoreApplicationStreaming;
import com.discord.stores.StoreChannels;
import com.discord.stores.StoreChannelsSelected;
import com.discord.stores.StoreExperiments;
import com.discord.stores.StoreGuildScheduledEvents;
import com.discord.stores.StoreMentions;
import com.discord.stores.StoreMessagesMostRecent;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserConnections;
import com.discord.stores.StoreUserGuildSettings;
import com.discord.stores.StoreUserPresence;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.channel.GuildChannelsInfo;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities;
import com.discord.utilities.permissions.PermissionUtils;
import com.discord.utilities.rx.ObservableCombineLatestOverloadsKt;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.channels.list.items.ChannelListItem;
import com.discord.widgets.channels.list.items.ChannelListItemActiveEventData;
import com.discord.widgets.channels.list.items.ChannelListItemCategory;
import com.discord.widgets.channels.list.items.ChannelListItemEventsSeparator;
import com.discord.widgets.channels.list.items.ChannelListItemInvite;
import com.discord.widgets.channels.list.items.ChannelListItemMfaNotice;
import com.discord.widgets.channels.list.items.ChannelListItemVoiceUser;
import com.discord.widgets.stage.StageRoles;
import com.discord.widgets.stage.model.StageChannel;
import d0.f0.q;
import d0.t.n;
import d0.t.o;
import d0.t.u;
import d0.z.d.m;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable;
/* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel {
public static final Companion Companion = new Companion(null);
private final List<GuildScheduledEvent> guildScheduledEvents;
private final boolean isGuildSelected;
private final List<ChannelListItem> items;
private final Guild selectedGuild;
private final boolean showContactSyncEmptyState;
private final boolean showEmptyState;
private final boolean showPremiumGuildHint;
/* compiled from: WidgetChannelListModel.kt */
public static final class Companion {
/* compiled from: WidgetChannelListModel.kt */
public static final class TextLikeChannelData {
private final boolean hide;
private final boolean locked;
private final int mentionCount;
private final boolean selected;
private final boolean unread;
public TextLikeChannelData(boolean z2, int i, boolean z3, boolean z4, boolean z5) {
this.selected = z2;
this.mentionCount = i;
this.unread = z3;
this.locked = z4;
this.hide = z5;
}
public static /* synthetic */ TextLikeChannelData copy$default(TextLikeChannelData textLikeChannelData, boolean z2, int i, boolean z3, boolean z4, boolean z5, int i2, Object obj) {
if ((i2 & 1) != 0) {
z2 = textLikeChannelData.selected;
}
if ((i2 & 2) != 0) {
i = textLikeChannelData.mentionCount;
}
if ((i2 & 4) != 0) {
z3 = textLikeChannelData.unread;
}
if ((i2 & 8) != 0) {
z4 = textLikeChannelData.locked;
}
if ((i2 & 16) != 0) {
z5 = textLikeChannelData.hide;
}
return textLikeChannelData.copy(z2, i, z3, z4, z5);
}
public final boolean component1() {
return this.selected;
}
public final int component2() {
return this.mentionCount;
}
public final boolean component3() {
return this.unread;
}
public final boolean component4() {
return this.locked;
}
public final boolean component5() {
return this.hide;
}
public final TextLikeChannelData copy(boolean z2, int i, boolean z3, boolean z4, boolean z5) {
return new TextLikeChannelData(z2, i, z3, z4, z5);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TextLikeChannelData)) {
return false;
}
TextLikeChannelData textLikeChannelData = (TextLikeChannelData) obj;
return this.selected == textLikeChannelData.selected && this.mentionCount == textLikeChannelData.mentionCount && this.unread == textLikeChannelData.unread && this.locked == textLikeChannelData.locked && this.hide == textLikeChannelData.hide;
}
public final boolean getHide() {
return this.hide;
}
public final boolean getLocked() {
return this.locked;
}
public final int getMentionCount() {
return this.mentionCount;
}
public final boolean getSelected() {
return this.selected;
}
public final boolean getUnread() {
return this.unread;
}
public int hashCode() {
boolean z2 = this.selected;
int i = 1;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = ((i2 * 31) + this.mentionCount) * 31;
boolean z3 = this.unread;
if (z3) {
z3 = true;
}
int i6 = z3 ? 1 : 0;
int i7 = z3 ? 1 : 0;
int i8 = z3 ? 1 : 0;
int i9 = (i5 + i6) * 31;
boolean z4 = this.locked;
if (z4) {
z4 = true;
}
int i10 = z4 ? 1 : 0;
int i11 = z4 ? 1 : 0;
int i12 = z4 ? 1 : 0;
int i13 = (i9 + i10) * 31;
boolean z5 = this.hide;
if (!z5) {
i = z5 ? 1 : 0;
}
return i13 + i;
}
public String toString() {
StringBuilder P = a.P("TextLikeChannelData(selected=");
P.append(this.selected);
P.append(", mentionCount=");
P.append(this.mentionCount);
P.append(", unread=");
P.append(this.unread);
P.append(", locked=");
P.append(this.locked);
P.append(", hide=");
return a.L(P, this.hide, ")");
}
}
/* compiled from: WidgetChannelListModel.kt */
public static final class VocalChannelData {
private final boolean locked;
private final int numUsersConnected;
private final Long permission;
private final boolean selected;
public VocalChannelData(boolean z2, boolean z3, Long l, int i) {
this.selected = z2;
this.locked = z3;
this.permission = l;
this.numUsersConnected = i;
}
public static /* synthetic */ VocalChannelData copy$default(VocalChannelData vocalChannelData, boolean z2, boolean z3, Long l, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
z2 = vocalChannelData.selected;
}
if ((i2 & 2) != 0) {
z3 = vocalChannelData.locked;
}
if ((i2 & 4) != 0) {
l = vocalChannelData.permission;
}
if ((i2 & 8) != 0) {
i = vocalChannelData.numUsersConnected;
}
return vocalChannelData.copy(z2, z3, l, i);
}
public final boolean component1() {
return this.selected;
}
public final boolean component2() {
return this.locked;
}
public final Long component3() {
return this.permission;
}
public final int component4() {
return this.numUsersConnected;
}
public final VocalChannelData copy(boolean z2, boolean z3, Long l, int i) {
return new VocalChannelData(z2, z3, l, i);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof VocalChannelData)) {
return false;
}
VocalChannelData vocalChannelData = (VocalChannelData) obj;
return this.selected == vocalChannelData.selected && this.locked == vocalChannelData.locked && m.areEqual(this.permission, vocalChannelData.permission) && this.numUsersConnected == vocalChannelData.numUsersConnected;
}
public final boolean getLocked() {
return this.locked;
}
public final int getNumUsersConnected() {
return this.numUsersConnected;
}
public final Long getPermission() {
return this.permission;
}
public final boolean getSelected() {
return this.selected;
}
public int hashCode() {
boolean z2 = this.selected;
int i = 1;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = i2 * 31;
boolean z3 = this.locked;
if (!z3) {
i = z3 ? 1 : 0;
}
int i6 = (i5 + i) * 31;
Long l = this.permission;
return ((i6 + (l != null ? l.hashCode() : 0)) * 31) + this.numUsersConnected;
}
public String toString() {
StringBuilder P = a.P("VocalChannelData(selected=");
P.append(this.selected);
P.append(", locked=");
P.append(this.locked);
P.append(", permission=");
P.append(this.permission);
P.append(", numUsersConnected=");
return a.z(P, this.numUsersConnected, ")");
}
}
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final /* synthetic */ Observable access$getPrivateChannelList(Companion companion) {
return companion.getPrivateChannelList();
}
public static final /* synthetic */ Observable access$getSelectedGuildChannelList(Companion companion, long j) {
return companion.getSelectedGuildChannelList(j);
}
public static final /* synthetic */ List access$guildListBuilder(Companion companion, long j, GuildChannelsInfo guildChannelsInfo, Map map, Map map2, Set set, Channel channel, long j2, Map map3, Map map4, Set set2, Set set3, Map map5, Map map6, List list, boolean z2) {
return companion.guildListBuilder(j, guildChannelsInfo, map, map2, set, channel, j2, map3, map4, set2, set3, map5, map6, list, z2);
}
private final ChannelListItemActiveEventData getChannelEventNoticeData(Map<Long, StageChannel> map, List<GuildScheduledEvent> list, Map<Long, ? extends Collection<ChannelListItemVoiceUser>> map2, Map<Long, Channel> map3) {
Object obj;
Channel channel;
ArrayList arrayList;
ChannelListItemVoiceUser channelListItemVoiceUser;
Object obj2;
boolean z2;
boolean z3;
Channel channel2;
StageChannel stageChannel = (StageChannel) q.firstOrNull(q.filter(u.asSequence(map.values()), WidgetChannelListModel$Companion$getChannelEventNoticeData$1.INSTANCE));
String str = null;
if (stageChannel != null) {
Channel channel3 = stageChannel.getChannel();
int audienceSize = stageChannel.getAudienceSize();
List<UserGuildMember> speakers = stageChannel.getSpeakers();
boolean containsMe = stageChannel.getContainsMe();
StageRoles r13 = stageChannel.m44getMyRolestwRsX0();
boolean z4 = r13 != null && StageRoles.m27isSpeakerimpl(r13.m29unboximpl());
StageInstance stageInstance = stageChannel.getStageInstance();
if (stageInstance != null) {
str = stageInstance.f();
}
return new ChannelListItemActiveEventData(str, channel3, audienceSize, speakers, containsMe, z4);
}
Iterator<T> it = list.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
}
obj = it.next();
GuildScheduledEvent guildScheduledEvent = (GuildScheduledEvent) obj;
if (guildScheduledEvent.k() == GuildScheduledEventStatus.ACTIVE && (channel2 = map3.get(guildScheduledEvent.b())) != null && channel2.A() == 2) {
z3 = true;
continue;
} else {
z3 = false;
continue;
}
if (z3) {
break;
}
}
GuildScheduledEvent guildScheduledEvent2 = (GuildScheduledEvent) obj;
if (!(guildScheduledEvent2 == null || (channel = map3.get(guildScheduledEvent2.b())) == null)) {
Collection<ChannelListItemVoiceUser> collection = (Collection) map2.get(guildScheduledEvent2.b());
if (collection != null) {
arrayList = new ArrayList(o.collectionSizeOrDefault(collection, 10));
for (ChannelListItemVoiceUser channelListItemVoiceUser2 : collection) {
arrayList.add(new UserGuildMember(channelListItemVoiceUser2.getUser(), channelListItemVoiceUser2.getComputed()));
}
} else {
arrayList = null;
}
long id2 = StoreStream.Companion.getUsers().getMe().getId();
Collection collection2 = (Collection) map2.get(guildScheduledEvent2.b());
if (collection2 != null) {
Iterator it2 = collection2.iterator();
while (true) {
if (!it2.hasNext()) {
obj2 = null;
break;
}
obj2 = it2.next();
if (((ChannelListItemVoiceUser) obj2).getUser().getId() == id2) {
z2 = true;
continue;
} else {
z2 = false;
continue;
}
if (z2) {
break;
}
}
channelListItemVoiceUser = (ChannelListItemVoiceUser) obj2;
} else {
channelListItemVoiceUser = null;
}
boolean z5 = channelListItemVoiceUser != null;
if (!z5) {
return new ChannelListItemActiveEventData(guildScheduledEvent2.h(), channel, 0, arrayList != null ? arrayList : n.emptyList(), z5, z5);
}
}
return null;
}
private final Observable<WidgetChannelListModel> getPrivateChannelList() {
StoreStream.Companion companion = StoreStream.Companion;
StoreChannels channels = companion.getChannels();
StoreChannelsSelected channelsSelected = companion.getChannelsSelected();
StoreUserPresence presences = companion.getPresences();
StoreMessagesMostRecent messagesMostRecent = companion.getMessagesMostRecent();
StoreMentions mentions = companion.getMentions();
StoreApplicationStreaming applicationStreaming = companion.getApplicationStreaming();
StoreUserGuildSettings userGuildSettings = companion.getUserGuildSettings();
StoreExperiments experiments = companion.getExperiments();
StoreUserConnections userConnections = companion.getUserConnections();
Observable<WidgetChannelListModel> F = ObservableExtensionsKt.leadingEdgeThrottle(ObservationDeck.connectRx$default(ObservationDeckProvider.get(), new ObservationDeck.UpdateSource[]{channels, channelsSelected, presences, messagesMostRecent, mentions, applicationStreaming, userGuildSettings, experiments, userConnections}, false, null, null, 14, null), 250, TimeUnit.MILLISECONDS).F(new WidgetChannelListModel$Companion$getPrivateChannelList$1(channels, messagesMostRecent, channelsSelected, presences, mentions, applicationStreaming, userGuildSettings, experiments, userConnections));
m.checkNotNullExpressionValue(F, "ObservationDeckProvider\n… )\n }");
return F;
}
private final Observable<WidgetChannelListModel> getSelectedGuildChannelList(long j) {
Observable<GuildChannelsInfo> observable = GuildChannelsInfo.Companion.get(j);
StoreStream.Companion companion = StoreStream.Companion;
return ObservableCombineLatestOverloadsKt.combineLatest(observable, StoreChannels.observeChannelsForGuild$default(companion.getChannels(), j, null, 2, null), companion.getThreadsActiveJoined().observeActiveJoinedThreadsForGuild(j), companion.getThreadsActive().observeChannelsWithActiveThreadsByGuild(j), companion.getChannelsSelected().observeSelectedChannel(), companion.getVoiceChannelSelected().observeSelectedVoiceChannelId(), VoiceStates.get$default(VoiceStates.INSTANCE, j, null, 2, null), companion.getMentions().observeMentionCounts(), companion.getReadStates().getUnreadChannelIds(), companion.getStoreChannelCategories().observeCollapsedCategories(j), companion.getNux().getNuxState(), companion.getStageChannels().observeGuildStageChannels(j), companion.getStageInstances().observeStageInstancesForGuild(j), StoreGuildScheduledEvents.observeGuildScheduledEvents$default(companion.getGuildScheduledEvents(), j, false, 2, null), GuildScheduledEventUtilities.Companion.observeCanCreateAnyEvent$default(GuildScheduledEventUtilities.Companion, j, null, null, null, 14, null), new WidgetChannelListModel$Companion$getSelectedGuildChannelList$1(j));
}
/* JADX ERROR: IndexOutOfBoundsException in pass: SSATransform
java.lang.IndexOutOfBoundsException: bitIndex < 0: -94
at java.base/java.util.BitSet.get(BitSet.java:626)
at jadx.core.dex.visitors.ssa.LiveVarAnalysis.fillBasicBlockInfo(LiveVarAnalysis.java:65)
at jadx.core.dex.visitors.ssa.LiveVarAnalysis.runAnalysis(LiveVarAnalysis.java:36)
at jadx.core.dex.visitors.ssa.SSATransform.process(SSATransform.java:55)
at jadx.core.dex.visitors.ssa.SSATransform.visit(SSATransform.java:41)
*/
private final java.util.List<com.discord.widgets.channels.list.items.ChannelListItem> guildListBuilder(long r146, com.discord.utilities.channel.GuildChannelsInfo r148, java.util.Map<java.lang.Long, com.discord.api.channel.Channel> r149, java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.stores.StoreThreadsActiveJoined.ActiveJoinedThread>> r150, java.util.Set<java.lang.Long> r151, com.discord.api.channel.Channel r152, long r153, java.util.Map<java.lang.Long, ? extends java.util.Collection<com.discord.widgets.channels.list.items.ChannelListItemVoiceUser>> r155, java.util.Map<java.lang.Long, java.lang.Integer> r156, java.util.Set<java.lang.Long> r157, java.util.Set<java.lang.Long> r158, java.util.Map<java.lang.Long, com.discord.widgets.stage.model.StageChannel> r159, java.util.Map<java.lang.Long, com.discord.api.stageinstance.StageInstance> r160, java.util.List<com.discord.api.guildscheduledevent.GuildScheduledEvent> r161, boolean r162) {
/*
// Method dump skipped, instructions count: 1225
*/
throw new UnsupportedOperationException("Method not decompiled: com.discord.widgets.channels.list.WidgetChannelListModel.Companion.guildListBuilder(long, com.discord.utilities.channel.GuildChannelsInfo, java.util.Map, java.util.Map, java.util.Set, com.discord.api.channel.Channel, long, java.util.Map, java.util.Map, java.util.Set, java.util.Set, java.util.Map, java.util.Map, java.util.List, boolean):java.util.List");
}
public final Observable<WidgetChannelListModel> get() {
Observable<WidgetChannelListModel> r = StoreStream.Companion.getGuildSelected().observeSelectedGuildId().X(WidgetChannelListModel$Companion$get$1.INSTANCE).r();
m.checkNotNullExpressionValue(r, "StoreStream\n .g… .distinctUntilChanged()");
return r;
}
}
/* compiled from: WidgetChannelListModel.kt */
public static abstract class ThreadSpineType {
/* compiled from: WidgetChannelListModel.kt */
public static final class End extends ThreadSpineType {
public static final End INSTANCE = new End();
private End() {
super(null);
}
}
/* compiled from: WidgetChannelListModel.kt */
public static final class Middle extends ThreadSpineType {
public static final Middle INSTANCE = new Middle();
private Middle() {
super(null);
}
}
/* compiled from: WidgetChannelListModel.kt */
public static final class Single extends ThreadSpineType {
public static final Single INSTANCE = new Single();
private Single() {
super(null);
}
}
/* compiled from: WidgetChannelListModel.kt */
public static final class Start extends ThreadSpineType {
public static final Start INSTANCE = new Start();
private Start() {
super(null);
}
}
private ThreadSpineType() {
}
public /* synthetic */ ThreadSpineType(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
/* compiled from: WidgetChannelListModel.kt */
public static final class VoiceStates {
public static final VoiceStates INSTANCE = new VoiceStates();
private VoiceStates() {
}
public static final /* synthetic */ Map access$createVoiceStates(VoiceStates voiceStates, Map map, Map map2, Map map3, Map map4, Map map5, Map map6, Comparator comparator) {
return voiceStates.createVoiceStates(map, map2, map3, map4, map5, map6, comparator);
}
private final Map<Long, List<ChannelListItemVoiceUser>> createVoiceStates(Map<Long, VoiceState> map, Map<Long, ? extends User> map2, Map<Long, GuildMember> map3, Map<Long, Channel> map4, Map<Long, ? extends ModelApplicationStream> map5, Map<Long, Long> map6, Comparator<ChannelListItemVoiceUser> comparator) {
Long a;
HashMap hashMap = new HashMap();
for (VoiceState voiceState : map.values()) {
long m = voiceState.m();
User user = (User) map2.get(Long.valueOf(m));
if (user != null && (a = voiceState.a()) != null) {
long longValue = a.longValue();
boolean can = PermissionUtils.can(Permission.CONNECT, map6.get(Long.valueOf(longValue)));
Long valueOf = Long.valueOf(longValue);
Object obj = hashMap.get(valueOf);
if (obj == null) {
obj = new ArrayList();
hashMap.put(valueOf, obj);
}
List list = (List) obj;
GuildMember guildMember = map3.get(Long.valueOf(m));
if (guildMember != null) {
Channel channel = map4.get(Long.valueOf(longValue));
if (channel != null) {
list.add(new ChannelListItemVoiceUser(channel, voiceState, user, guildMember, map5.containsKey(Long.valueOf(m)), can));
}
}
}
}
for (Map.Entry entry : hashMap.entrySet()) {
d0.t.q.sortWith((List) entry.getValue(), comparator);
}
return hashMap;
}
private final Comparator<ChannelListItemVoiceUser> createVoiceUserComparator() {
return WidgetChannelListModel$VoiceStates$createVoiceUserComparator$1.INSTANCE;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.channels.list.WidgetChannelListModel$VoiceStates */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Observable get$default(VoiceStates voiceStates, long j, Comparator comparator, int i, Object obj) {
if ((i & 2) != 0) {
comparator = voiceStates.createVoiceUserComparator();
}
return voiceStates.get(j, comparator);
}
public final Observable<Map<Long, List<ChannelListItemVoiceUser>>> get(long j, Comparator<ChannelListItemVoiceUser> comparator) {
m.checkNotNullParameter(comparator, "voiceUserComparator");
StoreStream.Companion companion = StoreStream.Companion;
Observable f = Observable.f(companion.getApplicationStreaming().observeStreamsForGuild(j), ObservableExtensionsKt.leadingEdgeThrottle(companion.getVoiceStates().observe(j), 200, TimeUnit.MILLISECONDS), companion.getUsers().observeAllUsers(), companion.getGuilds().observeComputed(j), StoreChannels.observeChannelsForGuild$default(companion.getChannels(), j, null, 2, null), companion.getPermissions().observeChannelPermissionsForGuild(j), new WidgetChannelListModel$VoiceStates$get$1(comparator));
m.checkNotNullExpressionValue(f, "Observable\n .co… )\n }");
Observable<Map<Long, List<ChannelListItemVoiceUser>>> r = ObservableExtensionsKt.computationLatest(f).r();
m.checkNotNullExpressionValue(r, "Observable\n .co… .distinctUntilChanged()");
return r;
}
}
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.List<? extends com.discord.widgets.channels.list.items.ChannelListItem> */
/* JADX WARN: Multi-variable type inference failed */
public WidgetChannelListModel(Guild guild, List<? extends ChannelListItem> list, boolean z2, boolean z3, boolean z4, boolean z5, List<GuildScheduledEvent> list2) {
m.checkNotNullParameter(list, "items");
m.checkNotNullParameter(list2, "guildScheduledEvents");
this.selectedGuild = guild;
this.items = list;
this.isGuildSelected = z2;
this.showPremiumGuildHint = z3;
this.showEmptyState = z4;
this.showContactSyncEmptyState = z5;
this.guildScheduledEvents = list2;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ WidgetChannelListModel(Guild guild, List list, boolean z2, boolean z3, boolean z4, boolean z5, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(guild, list, (i & 4) != 0 ? false : z2, (i & 8) != 0 ? false : z3, (i & 16) != 0 ? false : z4, (i & 32) != 0 ? false : z5, (i & 64) != 0 ? n.emptyList() : list2);
}
/* JADX DEBUG: Multi-variable search result rejected for r5v0, resolved type: com.discord.widgets.channels.list.WidgetChannelListModel */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ WidgetChannelListModel copy$default(WidgetChannelListModel widgetChannelListModel, Guild guild, List list, boolean z2, boolean z3, boolean z4, boolean z5, List list2, int i, Object obj) {
if ((i & 1) != 0) {
guild = widgetChannelListModel.selectedGuild;
}
if ((i & 2) != 0) {
list = widgetChannelListModel.items;
}
if ((i & 4) != 0) {
z2 = widgetChannelListModel.isGuildSelected;
}
if ((i & 8) != 0) {
z3 = widgetChannelListModel.showPremiumGuildHint;
}
if ((i & 16) != 0) {
z4 = widgetChannelListModel.showEmptyState;
}
if ((i & 32) != 0) {
z5 = widgetChannelListModel.showContactSyncEmptyState;
}
if ((i & 64) != 0) {
list2 = widgetChannelListModel.guildScheduledEvents;
}
return widgetChannelListModel.copy(guild, list, z2, z3, z4, z5, list2);
}
public final Guild component1() {
return this.selectedGuild;
}
public final List<ChannelListItem> component2() {
return this.items;
}
public final boolean component3() {
return this.isGuildSelected;
}
public final boolean component4() {
return this.showPremiumGuildHint;
}
public final boolean component5() {
return this.showEmptyState;
}
public final boolean component6() {
return this.showContactSyncEmptyState;
}
public final List<GuildScheduledEvent> component7() {
return this.guildScheduledEvents;
}
public final WidgetChannelListModel copy(Guild guild, List<? extends ChannelListItem> list, boolean z2, boolean z3, boolean z4, boolean z5, List<GuildScheduledEvent> list2) {
m.checkNotNullParameter(list, "items");
m.checkNotNullParameter(list2, "guildScheduledEvents");
return new WidgetChannelListModel(guild, list, z2, z3, z4, z5, list2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof WidgetChannelListModel)) {
return false;
}
WidgetChannelListModel widgetChannelListModel = (WidgetChannelListModel) obj;
return m.areEqual(this.selectedGuild, widgetChannelListModel.selectedGuild) && m.areEqual(this.items, widgetChannelListModel.items) && this.isGuildSelected == widgetChannelListModel.isGuildSelected && this.showPremiumGuildHint == widgetChannelListModel.showPremiumGuildHint && this.showEmptyState == widgetChannelListModel.showEmptyState && this.showContactSyncEmptyState == widgetChannelListModel.showContactSyncEmptyState && m.areEqual(this.guildScheduledEvents, widgetChannelListModel.guildScheduledEvents);
}
public final List<GuildScheduledEvent> getGuildScheduledEvents() {
return this.guildScheduledEvents;
}
public final List<ChannelListItem> getItems() {
return this.items;
}
public final Guild getSelectedGuild() {
return this.selectedGuild;
}
public final boolean getShowContactSyncEmptyState() {
return this.showContactSyncEmptyState;
}
public final boolean getShowEmptyState() {
return this.showEmptyState;
}
public final boolean getShowPremiumGuildHint() {
return this.showPremiumGuildHint;
}
public final boolean getStartsWithPaddedElement() {
ChannelListItem channelListItem = (ChannelListItem) u.firstOrNull((List<? extends Object>) this.items);
if (channelListItem != null) {
return (channelListItem instanceof ChannelListItemInvite) || (channelListItem instanceof ChannelListItemMfaNotice) || (channelListItem instanceof ChannelListItemCategory) || (channelListItem instanceof ChannelListItemEventsSeparator);
}
return false;
}
public int hashCode() {
Guild guild = this.selectedGuild;
int i = 0;
int hashCode = (guild != null ? guild.hashCode() : 0) * 31;
List<ChannelListItem> list = this.items;
int hashCode2 = (hashCode + (list != null ? list.hashCode() : 0)) * 31;
boolean z2 = this.isGuildSelected;
int i2 = 1;
if (z2) {
z2 = true;
}
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = z2 ? 1 : 0;
int i6 = (hashCode2 + i3) * 31;
boolean z3 = this.showPremiumGuildHint;
if (z3) {
z3 = true;
}
int i7 = z3 ? 1 : 0;
int i8 = z3 ? 1 : 0;
int i9 = z3 ? 1 : 0;
int i10 = (i6 + i7) * 31;
boolean z4 = this.showEmptyState;
if (z4) {
z4 = true;
}
int i11 = z4 ? 1 : 0;
int i12 = z4 ? 1 : 0;
int i13 = z4 ? 1 : 0;
int i14 = (i10 + i11) * 31;
boolean z5 = this.showContactSyncEmptyState;
if (!z5) {
i2 = z5 ? 1 : 0;
}
int i15 = (i14 + i2) * 31;
List<GuildScheduledEvent> list2 = this.guildScheduledEvents;
if (list2 != null) {
i = list2.hashCode();
}
return i15 + i;
}
public final boolean isGuildSelected() {
return this.isGuildSelected;
}
public String toString() {
StringBuilder P = a.P("WidgetChannelListModel(selectedGuild=");
P.append(this.selectedGuild);
P.append(", items=");
P.append(this.items);
P.append(", isGuildSelected=");
P.append(this.isGuildSelected);
P.append(", showPremiumGuildHint=");
P.append(this.showPremiumGuildHint);
P.append(", showEmptyState=");
P.append(this.showEmptyState);
P.append(", showContactSyncEmptyState=");
P.append(this.showContactSyncEmptyState);
P.append(", guildScheduledEvents=");
return a.J(P, this.guildScheduledEvents, ")");
}
}