215 lines
8.1 KiB
Java
215 lines
8.1 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.attachment.MessageAttachment;
|
|
import com.discord.models.domain.ModelMessage;
|
|
import com.discord.stores.StoreMessageState;
|
|
import d0.z.d.m;
|
|
/* compiled from: AttachmentEntry.kt */
|
|
public final class AttachmentEntry extends ChatListEntry {
|
|
private final boolean allowAnimatedEmojis;
|
|
private final MessageAttachment attachment;
|
|
private final boolean autoPlayGifs;
|
|
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 = 28;
|
|
|
|
/* 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.AttachmentEntry A[IMMUTABLE_TYPE, THIS]) type: VIRTUAL call: com.discord.widgets.chat.list.entries.AttachmentEntry.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 AttachmentEntry(int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageAttachment messageAttachment, boolean z2, boolean z3, boolean z4, boolean z5) {
|
|
m.checkNotNullParameter(modelMessage, "message");
|
|
m.checkNotNullParameter(messageAttachment, "attachment");
|
|
this.embedIndex = i;
|
|
this.guildId = j;
|
|
this.message = modelMessage;
|
|
this.messageState = state;
|
|
this.attachment = messageAttachment;
|
|
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 */ AttachmentEntry copy$default(AttachmentEntry attachmentEntry, int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageAttachment messageAttachment, boolean z2, boolean z3, boolean z4, boolean z5, int i2, Object obj) {
|
|
return attachmentEntry.copy((i2 & 1) != 0 ? attachmentEntry.embedIndex : i, (i2 & 2) != 0 ? attachmentEntry.guildId : j, (i2 & 4) != 0 ? attachmentEntry.message : modelMessage, (i2 & 8) != 0 ? attachmentEntry.messageState : state, (i2 & 16) != 0 ? attachmentEntry.attachment : messageAttachment, (i2 & 32) != 0 ? attachmentEntry.isBlockedExpanded : z2, (i2 & 64) != 0 ? attachmentEntry.allowAnimatedEmojis : z3, (i2 & 128) != 0 ? attachmentEntry.autoPlayGifs : z4, (i2 & 256) != 0 ? attachmentEntry.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 MessageAttachment component5() {
|
|
return this.attachment;
|
|
}
|
|
|
|
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 AttachmentEntry copy(int i, long j, ModelMessage modelMessage, StoreMessageState.State state, MessageAttachment messageAttachment, boolean z2, boolean z3, boolean z4, boolean z5) {
|
|
m.checkNotNullParameter(modelMessage, "message");
|
|
m.checkNotNullParameter(messageAttachment, "attachment");
|
|
return new AttachmentEntry(i, j, modelMessage, state, messageAttachment, z2, z3, z4, z5);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof AttachmentEntry)) {
|
|
return false;
|
|
}
|
|
AttachmentEntry attachmentEntry = (AttachmentEntry) obj;
|
|
return this.embedIndex == attachmentEntry.embedIndex && this.guildId == attachmentEntry.guildId && m.areEqual(this.message, attachmentEntry.message) && m.areEqual(this.messageState, attachmentEntry.messageState) && m.areEqual(this.attachment, attachmentEntry.attachment) && this.isBlockedExpanded == attachmentEntry.isBlockedExpanded && this.allowAnimatedEmojis == attachmentEntry.allowAnimatedEmojis && this.autoPlayGifs == attachmentEntry.autoPlayGifs && this.isThreadStarterMessage == attachmentEntry.isThreadStarterMessage;
|
|
}
|
|
|
|
public final boolean getAllowAnimatedEmojis() {
|
|
return this.allowAnimatedEmojis;
|
|
}
|
|
|
|
public final MessageAttachment getAttachment() {
|
|
return this.attachment;
|
|
}
|
|
|
|
public final boolean getAutoPlayGifs() {
|
|
return this.autoPlayGifs;
|
|
}
|
|
|
|
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;
|
|
MessageAttachment messageAttachment = this.attachment;
|
|
if (messageAttachment != null) {
|
|
i = messageAttachment.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("AttachmentEntry(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(", attachment=");
|
|
L.append(this.attachment);
|
|
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, ")");
|
|
}
|
|
}
|