2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.chat.list.entries;
|
|
|
|
|
|
|
|
import c.d.b.a.a;
|
2021-07-03 23:36:06 +00:00
|
|
|
import com.discord.models.message.Message;
|
2021-06-27 20:44:35 +00:00
|
|
|
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;
|
2021-06-27 20:53:42 +00:00
|
|
|
private final Message message;
|
2021-06-27 20:44:35 +00:00
|
|
|
private final int type = 4;
|
|
|
|
|
2021-06-27 20:53:42 +00:00
|
|
|
public ReactionsEntry(Message message, boolean z2, boolean z3, boolean z4) {
|
|
|
|
m.checkNotNullParameter(message, "message");
|
|
|
|
this.message = message;
|
2021-06-27 20:44:35 +00:00
|
|
|
this.canAddReactions = z2;
|
|
|
|
this.canCreateReactions = z3;
|
|
|
|
this.animateEmojis = z4;
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
sb.append(getType());
|
2021-07-03 23:36:06 +00:00
|
|
|
Object nonce = message.getNonce();
|
|
|
|
sb.append(nonce == null ? Long.valueOf(message.getId()) : nonce);
|
2021-06-27 20:44:35 +00:00
|
|
|
this.key = sb.toString();
|
|
|
|
}
|
|
|
|
|
2021-06-27 20:53:42 +00:00
|
|
|
public static /* synthetic */ ReactionsEntry copy$default(ReactionsEntry reactionsEntry, Message message, boolean z2, boolean z3, boolean z4, int i, Object obj) {
|
2021-06-27 20:44:35 +00:00
|
|
|
if ((i & 1) != 0) {
|
2021-06-27 20:53:42 +00:00
|
|
|
message = reactionsEntry.message;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
z2 = reactionsEntry.canAddReactions;
|
|
|
|
}
|
|
|
|
if ((i & 4) != 0) {
|
|
|
|
z3 = reactionsEntry.canCreateReactions;
|
|
|
|
}
|
|
|
|
if ((i & 8) != 0) {
|
|
|
|
z4 = reactionsEntry.animateEmojis;
|
|
|
|
}
|
2021-06-27 20:53:42 +00:00
|
|
|
return reactionsEntry.copy(message, z2, z3, z4);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-06-27 20:53:42 +00:00
|
|
|
public final Message component1() {
|
2021-06-27 20:44:35 +00:00
|
|
|
return this.message;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component2() {
|
|
|
|
return this.canAddReactions;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component3() {
|
|
|
|
return this.canCreateReactions;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component4() {
|
|
|
|
return this.animateEmojis;
|
|
|
|
}
|
|
|
|
|
2021-06-27 20:53:42 +00:00
|
|
|
public final ReactionsEntry copy(Message message, boolean z2, boolean z3, boolean z4) {
|
|
|
|
m.checkNotNullParameter(message, "message");
|
|
|
|
return new ReactionsEntry(message, z2, z3, z4);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2021-06-27 20:53:42 +00:00
|
|
|
public final Message getMessage() {
|
2021-06-27 20:44:35 +00:00
|
|
|
return this.message;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerDataPayload
|
|
|
|
public int getType() {
|
|
|
|
return this.type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
2021-06-27 20:53:42 +00:00
|
|
|
Message message = this.message;
|
|
|
|
int hashCode = (message != null ? message.hashCode() : 0) * 31;
|
2021-06-27 20:44:35 +00:00
|
|
|
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, ")");
|
|
|
|
}
|
|
|
|
}
|