2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.guilds.invite;
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.d.b.a.a;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.api.channel.Channel;
|
|
|
|
import com.discord.models.user.User;
|
|
|
|
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.z.d.m;
|
2021-08-03 07:33:18 +00:00
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
/* compiled from: InviteSuggestionItem.kt */
|
|
|
|
public abstract class InviteSuggestionItem implements MGRecyclerDataPayload {
|
|
|
|
public static final SearchNoResultsItem SearchNoResultsItem = new SearchNoResultsItem(null);
|
|
|
|
private static final String key = "SEARCH_NO_RESULTS";
|
|
|
|
private final int type;
|
|
|
|
|
|
|
|
/* compiled from: InviteSuggestionItem.kt */
|
|
|
|
public static final class ChannelItem extends InviteSuggestionItem {
|
|
|
|
private final Channel channel;
|
|
|
|
private final boolean hasSent;
|
|
|
|
private final String key;
|
|
|
|
private final int type = 1;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public ChannelItem(Channel channel, boolean z2) {
|
|
|
|
super(null);
|
|
|
|
m.checkNotNullParameter(channel, "channel");
|
|
|
|
this.channel = channel;
|
|
|
|
this.hasSent = z2;
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = a.R("c");
|
|
|
|
R.append(String.valueOf(channel.h()));
|
|
|
|
this.key = R.toString();
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ ChannelItem copy$default(ChannelItem channelItem, Channel channel, boolean z2, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
channel = channelItem.channel;
|
|
|
|
}
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
z2 = channelItem.hasSent;
|
|
|
|
}
|
|
|
|
return channelItem.copy(channel, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Channel component1() {
|
|
|
|
return this.channel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component2() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final ChannelItem copy(Channel channel, boolean z2) {
|
|
|
|
m.checkNotNullParameter(channel, "channel");
|
|
|
|
return new ChannelItem(channel, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(obj instanceof ChannelItem)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
ChannelItem channelItem = (ChannelItem) obj;
|
|
|
|
return m.areEqual(this.channel, channelItem.channel) && this.hasSent == channelItem.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Channel getChannel() {
|
|
|
|
return this.channel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean getHasSent() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
|
|
public String getKey() {
|
|
|
|
return this.key;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.widgets.guilds.invite.InviteSuggestionItem, com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
|
|
public int getType() {
|
|
|
|
return this.type;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.widgets.guilds.invite.InviteSuggestionItem
|
|
|
|
public boolean hasSentInvite() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
Channel channel = this.channel;
|
|
|
|
int hashCode = (channel != null ? channel.hashCode() : 0) * 31;
|
|
|
|
boolean z2 = this.hasSent;
|
|
|
|
if (z2) {
|
|
|
|
z2 = true;
|
|
|
|
}
|
|
|
|
int i = z2 ? 1 : 0;
|
|
|
|
int i2 = z2 ? 1 : 0;
|
|
|
|
int i3 = z2 ? 1 : 0;
|
|
|
|
return hashCode + i;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = a.R("ChannelItem(channel=");
|
|
|
|
R.append(this.channel);
|
|
|
|
R.append(", hasSent=");
|
|
|
|
return a.L(R, this.hasSent, ")");
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: InviteSuggestionItem.kt */
|
|
|
|
public static final class SearchNoResultsItem extends InviteSuggestionItem {
|
|
|
|
private SearchNoResultsItem() {
|
|
|
|
super(null);
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ SearchNoResultsItem(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
|
|
public String getKey() {
|
|
|
|
return InviteSuggestionItem.access$getKey$cp();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.widgets.guilds.invite.InviteSuggestionItem
|
|
|
|
public boolean hasSentInvite() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: InviteSuggestionItem.kt */
|
|
|
|
public static final class UserItem extends InviteSuggestionItem {
|
|
|
|
private final boolean hasSent;
|
|
|
|
private final String key;
|
|
|
|
private final int type;
|
|
|
|
private final User user;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public UserItem(User user, boolean z2) {
|
|
|
|
super(null);
|
|
|
|
m.checkNotNullParameter(user, "user");
|
|
|
|
this.user = user;
|
|
|
|
this.hasSent = z2;
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = a.R("u");
|
|
|
|
R.append(String.valueOf(user.getId()));
|
|
|
|
this.key = R.toString();
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ UserItem copy$default(UserItem userItem, User user, boolean z2, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
user = userItem.user;
|
|
|
|
}
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
z2 = userItem.hasSent;
|
|
|
|
}
|
|
|
|
return userItem.copy(user, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final User component1() {
|
|
|
|
return this.user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component2() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final UserItem copy(User user, boolean z2) {
|
|
|
|
m.checkNotNullParameter(user, "user");
|
|
|
|
return new UserItem(user, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(obj instanceof UserItem)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
UserItem userItem = (UserItem) obj;
|
|
|
|
return m.areEqual(this.user, userItem.user) && this.hasSent == userItem.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean getHasSent() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
|
|
public String getKey() {
|
|
|
|
return this.key;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.widgets.guilds.invite.InviteSuggestionItem, com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
|
|
public int getType() {
|
|
|
|
return this.type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final User getUser() {
|
|
|
|
return this.user;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.widgets.guilds.invite.InviteSuggestionItem
|
|
|
|
public boolean hasSentInvite() {
|
|
|
|
return this.hasSent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
User user = this.user;
|
|
|
|
int hashCode = (user != null ? user.hashCode() : 0) * 31;
|
|
|
|
boolean z2 = this.hasSent;
|
|
|
|
if (z2) {
|
|
|
|
z2 = true;
|
|
|
|
}
|
|
|
|
int i = z2 ? 1 : 0;
|
|
|
|
int i2 = z2 ? 1 : 0;
|
|
|
|
int i3 = z2 ? 1 : 0;
|
|
|
|
return hashCode + i;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = a.R("UserItem(user=");
|
|
|
|
R.append(this.user);
|
|
|
|
R.append(", hasSent=");
|
|
|
|
return a.L(R, this.hasSent, ")");
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private InviteSuggestionItem() {
|
|
|
|
this.type = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ InviteSuggestionItem(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ String access$getKey$cp() {
|
|
|
|
return key;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
|
|
public int getType() {
|
|
|
|
return this.type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract boolean hasSentInvite();
|
|
|
|
}
|