324 lines
12 KiB
Java
324 lines
12 KiB
Java
package com.discord.widgets.stage.start;
|
|
|
|
import androidx.annotation.DrawableRes;
|
|
import androidx.annotation.StringRes;
|
|
import c.d.b.a.a;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.models.guild.Guild;
|
|
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: StartStageServerSelectionItem.kt */
|
|
public abstract class StartStageServerSelectionItem implements MGRecyclerDataPayload {
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final int TYPE_BULLET = 1;
|
|
public static final int TYPE_GUILD = 0;
|
|
|
|
/* compiled from: StartStageServerSelectionItem.kt */
|
|
public static final class BulletItem extends StartStageServerSelectionItem {
|
|
private final int imageRes;
|
|
private final String key;
|
|
private final ItemPosition position;
|
|
private final int stringRes;
|
|
private final int type;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public BulletItem(@DrawableRes int i, @StringRes int i2, ItemPosition itemPosition, int i3, String str) {
|
|
super(null);
|
|
m.checkNotNullParameter(itemPosition, "position");
|
|
m.checkNotNullParameter(str, "key");
|
|
this.imageRes = i;
|
|
this.stringRes = i2;
|
|
this.position = itemPosition;
|
|
this.type = i3;
|
|
this.key = str;
|
|
}
|
|
|
|
/* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(r7v0 int), (' ' char), (r8v0 int)] */
|
|
/* JADX WARNING: Illegal instructions before constructor call */
|
|
public /* synthetic */ BulletItem(int i, int i2, ItemPosition itemPosition, int i3, String str, int i4, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(i, i2, itemPosition, r4, str);
|
|
int i5 = (i4 & 8) != 0 ? 1 : i3;
|
|
if ((i4 & 16) != 0) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(i);
|
|
sb.append(' ');
|
|
sb.append(i2);
|
|
str = sb.toString();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ BulletItem copy$default(BulletItem bulletItem, int i, int i2, ItemPosition itemPosition, int i3, String str, int i4, Object obj) {
|
|
if ((i4 & 1) != 0) {
|
|
i = bulletItem.imageRes;
|
|
}
|
|
if ((i4 & 2) != 0) {
|
|
i2 = bulletItem.stringRes;
|
|
}
|
|
if ((i4 & 4) != 0) {
|
|
itemPosition = bulletItem.getPosition();
|
|
}
|
|
if ((i4 & 8) != 0) {
|
|
i3 = bulletItem.getType();
|
|
}
|
|
if ((i4 & 16) != 0) {
|
|
str = bulletItem.getKey();
|
|
}
|
|
return bulletItem.copy(i, i2, itemPosition, i3, str);
|
|
}
|
|
|
|
public final int component1() {
|
|
return this.imageRes;
|
|
}
|
|
|
|
public final int component2() {
|
|
return this.stringRes;
|
|
}
|
|
|
|
public final ItemPosition component3() {
|
|
return getPosition();
|
|
}
|
|
|
|
public final int component4() {
|
|
return getType();
|
|
}
|
|
|
|
public final String component5() {
|
|
return getKey();
|
|
}
|
|
|
|
public final BulletItem copy(@DrawableRes int i, @StringRes int i2, ItemPosition itemPosition, int i3, String str) {
|
|
m.checkNotNullParameter(itemPosition, "position");
|
|
m.checkNotNullParameter(str, "key");
|
|
return new BulletItem(i, i2, itemPosition, i3, str);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof BulletItem)) {
|
|
return false;
|
|
}
|
|
BulletItem bulletItem = (BulletItem) obj;
|
|
return this.imageRes == bulletItem.imageRes && this.stringRes == bulletItem.stringRes && m.areEqual(getPosition(), bulletItem.getPosition()) && getType() == bulletItem.getType() && m.areEqual(getKey(), bulletItem.getKey());
|
|
}
|
|
|
|
public final int getImageRes() {
|
|
return this.imageRes;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
@Override // com.discord.widgets.stage.start.StartStageServerSelectionItem
|
|
public ItemPosition getPosition() {
|
|
return this.position;
|
|
}
|
|
|
|
public final int getStringRes() {
|
|
return this.stringRes;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
public int getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int i = ((this.imageRes * 31) + this.stringRes) * 31;
|
|
ItemPosition position = getPosition();
|
|
int i2 = 0;
|
|
int type = (getType() + ((i + (position != null ? position.hashCode() : 0)) * 31)) * 31;
|
|
String key = getKey();
|
|
if (key != null) {
|
|
i2 = key.hashCode();
|
|
}
|
|
return type + i2;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder K = a.K("BulletItem(imageRes=");
|
|
K.append(this.imageRes);
|
|
K.append(", stringRes=");
|
|
K.append(this.stringRes);
|
|
K.append(", position=");
|
|
K.append(getPosition());
|
|
K.append(", type=");
|
|
K.append(getType());
|
|
K.append(", key=");
|
|
K.append(getKey());
|
|
K.append(")");
|
|
return K.toString();
|
|
}
|
|
}
|
|
|
|
/* compiled from: StartStageServerSelectionItem.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
/* compiled from: StartStageServerSelectionItem.kt */
|
|
public static final class GuildItem extends StartStageServerSelectionItem {
|
|
private final Channel defaultStageChannel;
|
|
private final Guild guild;
|
|
private final String key;
|
|
private final ItemPosition position;
|
|
private final int type;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildItem(Guild guild, Channel channel, ItemPosition itemPosition, int i, String str) {
|
|
super(null);
|
|
m.checkNotNullParameter(guild, "guild");
|
|
m.checkNotNullParameter(channel, "defaultStageChannel");
|
|
m.checkNotNullParameter(itemPosition, "position");
|
|
m.checkNotNullParameter(str, "key");
|
|
this.guild = guild;
|
|
this.defaultStageChannel = channel;
|
|
this.position = itemPosition;
|
|
this.type = i;
|
|
this.key = str;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ GuildItem(Guild guild, Channel channel, ItemPosition itemPosition, int i, String str, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(guild, channel, itemPosition, (i2 & 8) != 0 ? 0 : i, (i2 & 16) != 0 ? String.valueOf(guild.getId()) : str);
|
|
}
|
|
|
|
public static /* synthetic */ GuildItem copy$default(GuildItem guildItem, Guild guild, Channel channel, ItemPosition itemPosition, int i, String str, int i2, Object obj) {
|
|
if ((i2 & 1) != 0) {
|
|
guild = guildItem.guild;
|
|
}
|
|
if ((i2 & 2) != 0) {
|
|
channel = guildItem.defaultStageChannel;
|
|
}
|
|
if ((i2 & 4) != 0) {
|
|
itemPosition = guildItem.getPosition();
|
|
}
|
|
if ((i2 & 8) != 0) {
|
|
i = guildItem.getType();
|
|
}
|
|
if ((i2 & 16) != 0) {
|
|
str = guildItem.getKey();
|
|
}
|
|
return guildItem.copy(guild, channel, itemPosition, i, str);
|
|
}
|
|
|
|
public final Guild component1() {
|
|
return this.guild;
|
|
}
|
|
|
|
public final Channel component2() {
|
|
return this.defaultStageChannel;
|
|
}
|
|
|
|
public final ItemPosition component3() {
|
|
return getPosition();
|
|
}
|
|
|
|
public final int component4() {
|
|
return getType();
|
|
}
|
|
|
|
public final String component5() {
|
|
return getKey();
|
|
}
|
|
|
|
public final GuildItem copy(Guild guild, Channel channel, ItemPosition itemPosition, int i, String str) {
|
|
m.checkNotNullParameter(guild, "guild");
|
|
m.checkNotNullParameter(channel, "defaultStageChannel");
|
|
m.checkNotNullParameter(itemPosition, "position");
|
|
m.checkNotNullParameter(str, "key");
|
|
return new GuildItem(guild, channel, itemPosition, i, str);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof GuildItem)) {
|
|
return false;
|
|
}
|
|
GuildItem guildItem = (GuildItem) obj;
|
|
return m.areEqual(this.guild, guildItem.guild) && m.areEqual(this.defaultStageChannel, guildItem.defaultStageChannel) && m.areEqual(getPosition(), guildItem.getPosition()) && getType() == guildItem.getType() && m.areEqual(getKey(), guildItem.getKey());
|
|
}
|
|
|
|
public final Channel getDefaultStageChannel() {
|
|
return this.defaultStageChannel;
|
|
}
|
|
|
|
public final Guild getGuild() {
|
|
return this.guild;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
@Override // com.discord.widgets.stage.start.StartStageServerSelectionItem
|
|
public ItemPosition getPosition() {
|
|
return this.position;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
public int getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public int hashCode() {
|
|
Guild guild = this.guild;
|
|
int i = 0;
|
|
int hashCode = (guild != null ? guild.hashCode() : 0) * 31;
|
|
Channel channel = this.defaultStageChannel;
|
|
int hashCode2 = (hashCode + (channel != null ? channel.hashCode() : 0)) * 31;
|
|
ItemPosition position = getPosition();
|
|
int type = (getType() + ((hashCode2 + (position != null ? position.hashCode() : 0)) * 31)) * 31;
|
|
String key = getKey();
|
|
if (key != null) {
|
|
i = key.hashCode();
|
|
}
|
|
return type + i;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder K = a.K("GuildItem(guild=");
|
|
K.append(this.guild);
|
|
K.append(", defaultStageChannel=");
|
|
K.append(this.defaultStageChannel);
|
|
K.append(", position=");
|
|
K.append(getPosition());
|
|
K.append(", type=");
|
|
K.append(getType());
|
|
K.append(", key=");
|
|
K.append(getKey());
|
|
K.append(")");
|
|
return K.toString();
|
|
}
|
|
}
|
|
|
|
/* compiled from: StartStageServerSelectionItem.kt */
|
|
public enum ItemPosition {
|
|
Top,
|
|
Middle,
|
|
Bottom,
|
|
Only
|
|
}
|
|
|
|
private StartStageServerSelectionItem() {
|
|
}
|
|
|
|
public /* synthetic */ StartStageServerSelectionItem(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public abstract ItemPosition getPosition();
|
|
}
|