115 lines
3.7 KiB
Java
115 lines
3.7 KiB
Java
package com.discord.widgets.channels;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.utilities.recycler.DiffKeyProvider;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: WidgetChannelPickerAdapter.kt */
|
|
public abstract class ChannelPickerAdapterItem implements DiffKeyProvider {
|
|
|
|
/* compiled from: WidgetChannelPickerAdapter.kt */
|
|
public static final class ChannelItem extends ChannelPickerAdapterItem {
|
|
private final Channel channel;
|
|
private final boolean isSelected;
|
|
private final String key;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ChannelItem(Channel channel, boolean z2) {
|
|
super(null);
|
|
m.checkNotNullParameter(channel, "channel");
|
|
this.channel = channel;
|
|
this.isSelected = z2;
|
|
this.key = String.valueOf(channel.h());
|
|
}
|
|
|
|
public static /* synthetic */ ChannelItem copy$default(ChannelItem channelItem, Channel channel, boolean z2, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
channel = channelItem.channel;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
z2 = channelItem.isSelected;
|
|
}
|
|
return channelItem.copy(channel, z2);
|
|
}
|
|
|
|
public final Channel component1() {
|
|
return this.channel;
|
|
}
|
|
|
|
public final boolean component2() {
|
|
return this.isSelected;
|
|
}
|
|
|
|
public final ChannelItem copy(Channel channel, boolean z2) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
return new ChannelItem(channel, z2);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ChannelItem)) {
|
|
return false;
|
|
}
|
|
ChannelItem channelItem = (ChannelItem) obj;
|
|
return m.areEqual(this.channel, channelItem.channel) && this.isSelected == channelItem.isSelected;
|
|
}
|
|
|
|
public final Channel getChannel() {
|
|
return this.channel;
|
|
}
|
|
|
|
@Override // com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
public int hashCode() {
|
|
Channel channel = this.channel;
|
|
int hashCode = (channel != null ? channel.hashCode() : 0) * 31;
|
|
boolean z2 = this.isSelected;
|
|
if (z2) {
|
|
z2 = true;
|
|
}
|
|
int i = z2 ? 1 : 0;
|
|
int i2 = z2 ? 1 : 0;
|
|
int i3 = z2 ? 1 : 0;
|
|
return hashCode + i;
|
|
}
|
|
|
|
public final boolean isSelected() {
|
|
return this.isSelected;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("ChannelItem(channel=");
|
|
L.append(this.channel);
|
|
L.append(", isSelected=");
|
|
return a.G(L, this.isSelected, ")");
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelPickerAdapter.kt */
|
|
public static final class CreateChannelItem extends ChannelPickerAdapterItem {
|
|
public static final CreateChannelItem INSTANCE = new CreateChannelItem();
|
|
private static final String key = "channel-picker-create-channel-item";
|
|
|
|
private CreateChannelItem() {
|
|
super(null);
|
|
}
|
|
|
|
@Override // com.discord.utilities.recycler.DiffKeyProvider
|
|
public String getKey() {
|
|
return key;
|
|
}
|
|
}
|
|
|
|
private ChannelPickerAdapterItem() {
|
|
}
|
|
|
|
public /* synthetic */ ChannelPickerAdapterItem(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
}
|