discord-jadx/app/src/main/java/com/discord/widgets/chat/list/entries/ReactionsEntry.java

140 lines
4.2 KiB
Java

package com.discord.widgets.chat.list.entries;
import c.d.b.a.a;
import com.discord.models.message.Message;
import d0.z.d.m;
/* compiled from: ReactionsEntry.kt */
public final class ReactionsEntry extends ChatListEntry {
private final boolean animateEmojis;
private final boolean canAddReactions;
private final boolean canCreateReactions;
private final String key;
private final Message message;
private final int type = 4;
public ReactionsEntry(Message message, boolean z2, boolean z3, boolean z4) {
m.checkNotNullParameter(message, "message");
this.message = message;
this.canAddReactions = z2;
this.canCreateReactions = z3;
this.animateEmojis = z4;
StringBuilder sb = new StringBuilder();
sb.append(getType());
Object nonce = message.getNonce();
sb.append(nonce == null ? Long.valueOf(message.getId()) : nonce);
this.key = sb.toString();
}
public static /* synthetic */ ReactionsEntry copy$default(ReactionsEntry reactionsEntry, Message message, boolean z2, boolean z3, boolean z4, int i, Object obj) {
if ((i & 1) != 0) {
message = reactionsEntry.message;
}
if ((i & 2) != 0) {
z2 = reactionsEntry.canAddReactions;
}
if ((i & 4) != 0) {
z3 = reactionsEntry.canCreateReactions;
}
if ((i & 8) != 0) {
z4 = reactionsEntry.animateEmojis;
}
return reactionsEntry.copy(message, z2, z3, z4);
}
public final Message component1() {
return this.message;
}
public final boolean component2() {
return this.canAddReactions;
}
public final boolean component3() {
return this.canCreateReactions;
}
public final boolean component4() {
return this.animateEmojis;
}
public final ReactionsEntry copy(Message message, boolean z2, boolean z3, boolean z4) {
m.checkNotNullParameter(message, "message");
return new ReactionsEntry(message, z2, z3, z4);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ReactionsEntry)) {
return false;
}
ReactionsEntry reactionsEntry = (ReactionsEntry) obj;
return m.areEqual(this.message, reactionsEntry.message) && this.canAddReactions == reactionsEntry.canAddReactions && this.canCreateReactions == reactionsEntry.canCreateReactions && this.animateEmojis == reactionsEntry.animateEmojis;
}
public final boolean getAnimateEmojis() {
return this.animateEmojis;
}
public final boolean getCanAddReactions() {
return this.canAddReactions;
}
public final boolean getCanCreateReactions() {
return this.canCreateReactions;
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
public String getKey() {
return this.key;
}
public final Message getMessage() {
return this.message;
}
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
public int getType() {
return this.type;
}
public int hashCode() {
Message message = this.message;
int hashCode = (message != null ? message.hashCode() : 0) * 31;
boolean z2 = this.canAddReactions;
int i = 1;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = (hashCode + i2) * 31;
boolean z3 = this.canCreateReactions;
if (z3) {
z3 = true;
}
int i6 = z3 ? 1 : 0;
int i7 = z3 ? 1 : 0;
int i8 = z3 ? 1 : 0;
int i9 = (i5 + i6) * 31;
boolean z4 = this.animateEmojis;
if (!z4) {
i = z4 ? 1 : 0;
}
return i9 + i;
}
public String toString() {
StringBuilder L = a.L("ReactionsEntry(message=");
L.append(this.message);
L.append(", canAddReactions=");
L.append(this.canAddReactions);
L.append(", canCreateReactions=");
L.append(this.canCreateReactions);
L.append(", animateEmojis=");
return a.G(L, this.animateEmojis, ")");
}
}