discord-jadx/app/src/main/java/com/discord/widgets/chat/input/sticker/StickerItem.java

138 lines
4.5 KiB
Java

package com.discord.widgets.chat.input.sticker;
import c.d.b.a.a;
import com.discord.api.sticker.Sticker;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import com.discord.utilities.stickers.StickerUtils;
import d0.z.d.m;
/* compiled from: StickerAdapterItems.kt */
public final class StickerItem implements MGRecyclerDataPayload {
private final String key;
private final Mode mode;
private final StickerUtils.StickerSendability sendability;
private final Sticker sticker;
private final int stickerAnimationSettings;
private final int type = 1;
/* compiled from: StickerAdapterItems.kt */
public enum Mode {
OWNED,
STORE
}
public StickerItem(Sticker sticker, int i, Mode mode, StickerUtils.StickerSendability stickerSendability) {
m.checkNotNullParameter(sticker, "sticker");
m.checkNotNullParameter(mode, "mode");
m.checkNotNullParameter(stickerSendability, "sendability");
this.sticker = sticker;
this.stickerAnimationSettings = i;
this.mode = mode;
this.sendability = stickerSendability;
StringBuilder K = a.K("sticker:");
K.append(sticker.getId());
this.key = K.toString();
}
public static /* synthetic */ StickerItem copy$default(StickerItem stickerItem, Sticker sticker, int i, Mode mode, StickerUtils.StickerSendability stickerSendability, int i2, Object obj) {
if ((i2 & 1) != 0) {
sticker = stickerItem.sticker;
}
if ((i2 & 2) != 0) {
i = stickerItem.stickerAnimationSettings;
}
if ((i2 & 4) != 0) {
mode = stickerItem.mode;
}
if ((i2 & 8) != 0) {
stickerSendability = stickerItem.sendability;
}
return stickerItem.copy(sticker, i, mode, stickerSendability);
}
public final Sticker component1() {
return this.sticker;
}
public final int component2() {
return this.stickerAnimationSettings;
}
public final Mode component3() {
return this.mode;
}
public final StickerUtils.StickerSendability component4() {
return this.sendability;
}
public final StickerItem copy(Sticker sticker, int i, Mode mode, StickerUtils.StickerSendability stickerSendability) {
m.checkNotNullParameter(sticker, "sticker");
m.checkNotNullParameter(mode, "mode");
m.checkNotNullParameter(stickerSendability, "sendability");
return new StickerItem(sticker, i, mode, stickerSendability);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof StickerItem)) {
return false;
}
StickerItem stickerItem = (StickerItem) obj;
return m.areEqual(this.sticker, stickerItem.sticker) && this.stickerAnimationSettings == stickerItem.stickerAnimationSettings && m.areEqual(this.mode, stickerItem.mode) && m.areEqual(this.sendability, stickerItem.sendability);
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
public String getKey() {
return this.key;
}
public final Mode getMode() {
return this.mode;
}
public final StickerUtils.StickerSendability getSendability() {
return this.sendability;
}
public final Sticker getSticker() {
return this.sticker;
}
public final int getStickerAnimationSettings() {
return this.stickerAnimationSettings;
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
public int getType() {
return this.type;
}
public int hashCode() {
Sticker sticker = this.sticker;
int i = 0;
int hashCode = (((sticker != null ? sticker.hashCode() : 0) * 31) + this.stickerAnimationSettings) * 31;
Mode mode = this.mode;
int hashCode2 = (hashCode + (mode != null ? mode.hashCode() : 0)) * 31;
StickerUtils.StickerSendability stickerSendability = this.sendability;
if (stickerSendability != null) {
i = stickerSendability.hashCode();
}
return hashCode2 + i;
}
public String toString() {
StringBuilder K = a.K("StickerItem(sticker=");
K.append(this.sticker);
K.append(", stickerAnimationSettings=");
K.append(this.stickerAnimationSettings);
K.append(", mode=");
K.append(this.mode);
K.append(", sendability=");
K.append(this.sendability);
K.append(")");
return K.toString();
}
}