236 lines
8.2 KiB
Java
236 lines
8.2 KiB
Java
package com.discord.widgets.chat.input.sticker;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.models.sticker.dto.ModelStickerPack;
|
|
import com.discord.utilities.recycler.DiffKeyProvider;
|
|
import d0.z.d.m;
|
|
import kotlin.Pair;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: StickerCategoryItem.kt */
|
|
public abstract class StickerCategoryItem implements DiffKeyProvider {
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final int TYPE_PACK = 1;
|
|
public static final int TYPE_RECENT = 0;
|
|
private final boolean isSelected;
|
|
|
|
/* compiled from: StickerCategoryItem.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
/* compiled from: StickerCategoryItem.kt */
|
|
public static final class PackItem extends StickerCategoryItem {
|
|
private final Pair<Integer, Integer> categoryRange;
|
|
private final boolean isSelected;
|
|
private final String key;
|
|
private final ModelStickerPack pack;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public PackItem(ModelStickerPack modelStickerPack, Pair<Integer, Integer> pair, boolean z2) {
|
|
super(z2, null);
|
|
m.checkNotNullParameter(modelStickerPack, "pack");
|
|
m.checkNotNullParameter(pair, "categoryRange");
|
|
this.pack = modelStickerPack;
|
|
this.categoryRange = pair;
|
|
this.isSelected = z2;
|
|
this.key = String.valueOf(modelStickerPack.getId());
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.chat.input.sticker.StickerCategoryItem$PackItem */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static /* synthetic */ PackItem copy$default(PackItem packItem, ModelStickerPack modelStickerPack, Pair pair, boolean z2, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
modelStickerPack = packItem.pack;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
pair = packItem.categoryRange;
|
|
}
|
|
if ((i & 4) != 0) {
|
|
z2 = packItem.isSelected();
|
|
}
|
|
return packItem.copy(modelStickerPack, pair, z2);
|
|
}
|
|
|
|
public final ModelStickerPack component1() {
|
|
return this.pack;
|
|
}
|
|
|
|
public final Pair<Integer, Integer> component2() {
|
|
return this.categoryRange;
|
|
}
|
|
|
|
public final boolean component3() {
|
|
return isSelected();
|
|
}
|
|
|
|
public final PackItem copy(ModelStickerPack modelStickerPack, Pair<Integer, Integer> pair, boolean z2) {
|
|
m.checkNotNullParameter(modelStickerPack, "pack");
|
|
m.checkNotNullParameter(pair, "categoryRange");
|
|
return new PackItem(modelStickerPack, pair, z2);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof PackItem)) {
|
|
return false;
|
|
}
|
|
PackItem packItem = (PackItem) obj;
|
|
return m.areEqual(this.pack, packItem.pack) && m.areEqual(this.categoryRange, packItem.categoryRange) && isSelected() == packItem.isSelected();
|
|
}
|
|
|
|
public final Pair<Integer, Integer> getCategoryRange() {
|
|
return this.categoryRange;
|
|
}
|
|
|
|
@Override // com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
public final ModelStickerPack getPack() {
|
|
return this.pack;
|
|
}
|
|
|
|
public int hashCode() {
|
|
ModelStickerPack modelStickerPack = this.pack;
|
|
int i = 0;
|
|
int hashCode = (modelStickerPack != null ? modelStickerPack.hashCode() : 0) * 31;
|
|
Pair<Integer, Integer> pair = this.categoryRange;
|
|
if (pair != null) {
|
|
i = pair.hashCode();
|
|
}
|
|
int i2 = (hashCode + i) * 31;
|
|
boolean isSelected = isSelected();
|
|
if (isSelected) {
|
|
isSelected = true;
|
|
}
|
|
int i3 = isSelected ? 1 : 0;
|
|
int i4 = isSelected ? 1 : 0;
|
|
int i5 = isSelected ? 1 : 0;
|
|
return i2 + i3;
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.input.sticker.StickerCategoryItem
|
|
public boolean isSelected() {
|
|
return this.isSelected;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("PackItem(pack=");
|
|
L.append(this.pack);
|
|
L.append(", categoryRange=");
|
|
L.append(this.categoryRange);
|
|
L.append(", isSelected=");
|
|
L.append(isSelected());
|
|
L.append(")");
|
|
return L.toString();
|
|
}
|
|
}
|
|
|
|
/* compiled from: StickerCategoryItem.kt */
|
|
public static final class RecentItem extends StickerCategoryItem {
|
|
private final Pair<Integer, Integer> categoryRange;
|
|
private final boolean isSelected;
|
|
private final String key = "recent";
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public RecentItem(boolean z2, Pair<Integer, Integer> pair) {
|
|
super(z2, null);
|
|
m.checkNotNullParameter(pair, "categoryRange");
|
|
this.isSelected = z2;
|
|
this.categoryRange = pair;
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.chat.input.sticker.StickerCategoryItem$RecentItem */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static /* synthetic */ RecentItem copy$default(RecentItem recentItem, boolean z2, Pair pair, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
z2 = recentItem.isSelected();
|
|
}
|
|
if ((i & 2) != 0) {
|
|
pair = recentItem.categoryRange;
|
|
}
|
|
return recentItem.copy(z2, pair);
|
|
}
|
|
|
|
public final boolean component1() {
|
|
return isSelected();
|
|
}
|
|
|
|
public final Pair<Integer, Integer> component2() {
|
|
return this.categoryRange;
|
|
}
|
|
|
|
public final RecentItem copy(boolean z2, Pair<Integer, Integer> pair) {
|
|
m.checkNotNullParameter(pair, "categoryRange");
|
|
return new RecentItem(z2, pair);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof RecentItem)) {
|
|
return false;
|
|
}
|
|
RecentItem recentItem = (RecentItem) obj;
|
|
return isSelected() == recentItem.isSelected() && m.areEqual(this.categoryRange, recentItem.categoryRange);
|
|
}
|
|
|
|
public final Pair<Integer, Integer> getCategoryRange() {
|
|
return this.categoryRange;
|
|
}
|
|
|
|
@Override // com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
public int hashCode() {
|
|
boolean isSelected = isSelected();
|
|
if (isSelected) {
|
|
isSelected = true;
|
|
}
|
|
int i = isSelected ? 1 : 0;
|
|
int i2 = isSelected ? 1 : 0;
|
|
int i3 = isSelected ? 1 : 0;
|
|
int i4 = i * 31;
|
|
Pair<Integer, Integer> pair = this.categoryRange;
|
|
return i4 + (pair != null ? pair.hashCode() : 0);
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.input.sticker.StickerCategoryItem
|
|
public boolean isSelected() {
|
|
return this.isSelected;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("RecentItem(isSelected=");
|
|
L.append(isSelected());
|
|
L.append(", categoryRange=");
|
|
L.append(this.categoryRange);
|
|
L.append(")");
|
|
return L.toString();
|
|
}
|
|
}
|
|
|
|
private StickerCategoryItem(boolean z2) {
|
|
this.isSelected = z2;
|
|
}
|
|
|
|
public /* synthetic */ StickerCategoryItem(boolean z2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(z2);
|
|
}
|
|
|
|
public boolean isSelected() {
|
|
return this.isSelected;
|
|
}
|
|
}
|