215 lines
7.8 KiB
Java
215 lines
7.8 KiB
Java
package com.discord.widgets.chat.list.entries;
|
|
|
|
import a0.a.a.b;
|
|
import c.d.b.a.a;
|
|
import com.discord.api.message.embed.MessageEmbed;
|
|
import com.discord.models.domain.ModelMessage;
|
|
import com.discord.stores.StoreMessageState;
|
|
import d0.z.d.m;
|
|
/* compiled from: EmbedEntry.kt */
|
|
public final class EmbedEntry extends ChatListEntry {
|
|
private final boolean allowAnimatedEmojis;
|
|
private final boolean autoPlayGifs;
|
|
private final MessageEmbed embed;
|
|
private final int embedIndex;
|
|
private final long guildId;
|
|
private final boolean isBlockedExpanded;
|
|
private final boolean isThreadStarterMessage;
|
|
private final String key;
|
|
private final ModelMessage message;
|
|
private final StoreMessageState.State messageState;
|
|
private final int type = 21;
|
|
|
|
/* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(wrap: int : 0x0028: INVOKE (r3v1 int) = (r1v0 'this' com.discord.widgets.chat.list.entries.EmbedEntry A[IMMUTABLE_TYPE, THIS]) type: VIRTUAL call: com.discord.widgets.chat.list.entries.EmbedEntry.getType():int), (wrap: long : 0x002f: INVOKE (r3v2 long) = (r5v0 com.discord.models.domain.ModelMessage) type: VIRTUAL call: com.discord.models.domain.ModelMessage.getId():long)] */
|
|
public EmbedEntry(int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageEmbed messageEmbed, boolean z2, boolean z3, boolean z4, boolean z5) {
|
|
m.checkNotNullParameter(modelMessage, "message");
|
|
m.checkNotNullParameter(messageEmbed, "embed");
|
|
this.embedIndex = i;
|
|
this.guildId = j;
|
|
this.message = modelMessage;
|
|
this.messageState = state;
|
|
this.embed = messageEmbed;
|
|
this.isBlockedExpanded = z2;
|
|
this.allowAnimatedEmojis = z3;
|
|
this.autoPlayGifs = z4;
|
|
this.isThreadStarterMessage = z5;
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(getType());
|
|
sb.append(modelMessage.getId());
|
|
this.key = sb.toString();
|
|
}
|
|
|
|
public static /* synthetic */ EmbedEntry copy$default(EmbedEntry embedEntry, int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageEmbed messageEmbed, boolean z2, boolean z3, boolean z4, boolean z5, int i2, Object obj) {
|
|
return embedEntry.copy((i2 & 1) != 0 ? embedEntry.embedIndex : i, (i2 & 2) != 0 ? embedEntry.guildId : j, (i2 & 4) != 0 ? embedEntry.message : modelMessage, (i2 & 8) != 0 ? embedEntry.messageState : state, (i2 & 16) != 0 ? embedEntry.embed : messageEmbed, (i2 & 32) != 0 ? embedEntry.isBlockedExpanded : z2, (i2 & 64) != 0 ? embedEntry.allowAnimatedEmojis : z3, (i2 & 128) != 0 ? embedEntry.autoPlayGifs : z4, (i2 & 256) != 0 ? embedEntry.isThreadStarterMessage : z5);
|
|
}
|
|
|
|
public final int component1() {
|
|
return this.embedIndex;
|
|
}
|
|
|
|
public final long component2() {
|
|
return this.guildId;
|
|
}
|
|
|
|
public final ModelMessage component3() {
|
|
return this.message;
|
|
}
|
|
|
|
public final StoreMessageState.State component4() {
|
|
return this.messageState;
|
|
}
|
|
|
|
public final MessageEmbed component5() {
|
|
return this.embed;
|
|
}
|
|
|
|
public final boolean component6() {
|
|
return this.isBlockedExpanded;
|
|
}
|
|
|
|
public final boolean component7() {
|
|
return this.allowAnimatedEmojis;
|
|
}
|
|
|
|
public final boolean component8() {
|
|
return this.autoPlayGifs;
|
|
}
|
|
|
|
public final boolean component9() {
|
|
return this.isThreadStarterMessage;
|
|
}
|
|
|
|
public final EmbedEntry copy(int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageEmbed messageEmbed, boolean z2, boolean z3, boolean z4, boolean z5) {
|
|
m.checkNotNullParameter(modelMessage, "message");
|
|
m.checkNotNullParameter(messageEmbed, "embed");
|
|
return new EmbedEntry(i, j, modelMessage, state, messageEmbed, z2, z3, z4, z5);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof EmbedEntry)) {
|
|
return false;
|
|
}
|
|
EmbedEntry embedEntry = (EmbedEntry) obj;
|
|
return this.embedIndex == embedEntry.embedIndex && this.guildId == embedEntry.guildId && m.areEqual(this.message, embedEntry.message) && m.areEqual(this.messageState, embedEntry.messageState) && m.areEqual(this.embed, embedEntry.embed) && this.isBlockedExpanded == embedEntry.isBlockedExpanded && this.allowAnimatedEmojis == embedEntry.allowAnimatedEmojis && this.autoPlayGifs == embedEntry.autoPlayGifs && this.isThreadStarterMessage == embedEntry.isThreadStarterMessage;
|
|
}
|
|
|
|
public final boolean getAllowAnimatedEmojis() {
|
|
return this.allowAnimatedEmojis;
|
|
}
|
|
|
|
public final boolean getAutoPlayGifs() {
|
|
return this.autoPlayGifs;
|
|
}
|
|
|
|
public final MessageEmbed getEmbed() {
|
|
return this.embed;
|
|
}
|
|
|
|
public final int getEmbedIndex() {
|
|
return this.embedIndex;
|
|
}
|
|
|
|
public final long getGuildId() {
|
|
return this.guildId;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
public final ModelMessage getMessage() {
|
|
return this.message;
|
|
}
|
|
|
|
public final StoreMessageState.State getMessageState() {
|
|
return this.messageState;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
public int getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int a = (b.a(this.guildId) + (this.embedIndex * 31)) * 31;
|
|
ModelMessage modelMessage = this.message;
|
|
int i = 0;
|
|
int hashCode = (a + (modelMessage != null ? modelMessage.hashCode() : 0)) * 31;
|
|
StoreMessageState.State state = this.messageState;
|
|
int hashCode2 = (hashCode + (state != null ? state.hashCode() : 0)) * 31;
|
|
MessageEmbed messageEmbed = this.embed;
|
|
if (messageEmbed != null) {
|
|
i = messageEmbed.hashCode();
|
|
}
|
|
int i2 = (hashCode2 + i) * 31;
|
|
boolean z2 = this.isBlockedExpanded;
|
|
int i3 = 1;
|
|
if (z2) {
|
|
z2 = true;
|
|
}
|
|
int i4 = z2 ? 1 : 0;
|
|
int i5 = z2 ? 1 : 0;
|
|
int i6 = z2 ? 1 : 0;
|
|
int i7 = (i2 + i4) * 31;
|
|
boolean z3 = this.allowAnimatedEmojis;
|
|
if (z3) {
|
|
z3 = true;
|
|
}
|
|
int i8 = z3 ? 1 : 0;
|
|
int i9 = z3 ? 1 : 0;
|
|
int i10 = z3 ? 1 : 0;
|
|
int i11 = (i7 + i8) * 31;
|
|
boolean z4 = this.autoPlayGifs;
|
|
if (z4) {
|
|
z4 = true;
|
|
}
|
|
int i12 = z4 ? 1 : 0;
|
|
int i13 = z4 ? 1 : 0;
|
|
int i14 = z4 ? 1 : 0;
|
|
int i15 = (i11 + i12) * 31;
|
|
boolean z5 = this.isThreadStarterMessage;
|
|
if (!z5) {
|
|
i3 = z5 ? 1 : 0;
|
|
}
|
|
return i15 + i3;
|
|
}
|
|
|
|
public final boolean isBlockedExpanded() {
|
|
return this.isBlockedExpanded;
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.list.entries.ChatListEntry
|
|
public boolean isInExpandedBlockedMessageChunk() {
|
|
return this.isBlockedExpanded;
|
|
}
|
|
|
|
public final boolean isThreadStarterMessage() {
|
|
return this.isThreadStarterMessage;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("EmbedEntry(embedIndex=");
|
|
L.append(this.embedIndex);
|
|
L.append(", guildId=");
|
|
L.append(this.guildId);
|
|
L.append(", message=");
|
|
L.append(this.message);
|
|
L.append(", messageState=");
|
|
L.append(this.messageState);
|
|
L.append(", embed=");
|
|
L.append(this.embed);
|
|
L.append(", isBlockedExpanded=");
|
|
L.append(this.isBlockedExpanded);
|
|
L.append(", allowAnimatedEmojis=");
|
|
L.append(this.allowAnimatedEmojis);
|
|
L.append(", autoPlayGifs=");
|
|
L.append(this.autoPlayGifs);
|
|
L.append(", isThreadStarterMessage=");
|
|
return a.G(L, this.isThreadStarterMessage, ")");
|
|
}
|
|
}
|