1715 lines
101 KiB
Java
1715 lines
101 KiB
Java
package com.discord.widgets.channels.list;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.Context;
|
|
import android.content.res.ColorStateList;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.animation.AccelerateDecelerateInterpolator;
|
|
import android.view.animation.RotateAnimation;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import androidx.annotation.ColorInt;
|
|
import androidx.annotation.DrawableRes;
|
|
import androidx.annotation.LayoutRes;
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
import androidx.core.content.ContextCompat;
|
|
import androidx.core.view.ViewCompat;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import c.a.k.b;
|
|
import c.d.b.a.a;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.api.guild.GuildMaxVideoChannelUsers;
|
|
import com.discord.api.stageinstance.StageInstance;
|
|
import com.discord.api.voice.state.VoiceState;
|
|
import com.discord.databinding.WidgetChannelsListItemActiveStageEventBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemAudienceCountBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemCategoryBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemChannelBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemChannelPrivateBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemChannelStageVoiceBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemChannelVoiceBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemDirectoryBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemGuildScheduledEventsBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemHeaderBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemMfaBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemThreadBinding;
|
|
import com.discord.databinding.WidgetChannelsListItemVoiceUserBinding;
|
|
import com.discord.models.member.GuildMember;
|
|
import com.discord.models.presence.Presence;
|
|
import com.discord.models.user.User;
|
|
import com.discord.utilities.color.ColorCompat;
|
|
import com.discord.utilities.drawable.DrawableCompat;
|
|
import com.discord.utilities.font.FontUtils;
|
|
import com.discord.utilities.icon.IconUtils;
|
|
import com.discord.utilities.mg_recycler.MGRecyclerAdapterSimple;
|
|
import com.discord.utilities.mg_recycler.MGRecyclerViewHolder;
|
|
import com.discord.utilities.permissions.PermissionUtils;
|
|
import com.discord.utilities.presence.PresenceUtils;
|
|
import com.discord.utilities.resources.StringResourceUtilsKt;
|
|
import com.discord.utilities.view.extensions.ViewExtensions;
|
|
import com.discord.utilities.view.text.LinkifiedTextView;
|
|
import com.discord.utilities.view.text.SimpleDraweeSpanTextView;
|
|
import com.discord.views.StatusView;
|
|
import com.discord.views.VoiceUserLimitView;
|
|
import com.discord.views.user.UserSummaryView;
|
|
import com.discord.widgets.channels.list.WidgetChannelListModel;
|
|
import com.discord.widgets.channels.list.items.ChannelListBottomNavSpaceItem;
|
|
import com.discord.widgets.channels.list.items.ChannelListItem;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemAddServer;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemCategory;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemDirectory;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemGuildScheduledEvents;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemHeader;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemInvite;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemPrivate;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemStageActiveEvent;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemStageAudienceCount;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemStageVoiceChannel;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemTextChannel;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemThread;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemVoiceChannel;
|
|
import com.discord.widgets.channels.list.items.ChannelListItemVoiceUser;
|
|
import com.discord.widgets.channels.list.items.ChannelListVocalItem;
|
|
import com.discord.widgets.stage.StageRoles;
|
|
import com.discord.widgets.stage.model.StageChannel;
|
|
import com.facebook.drawee.view.SimpleDraweeView;
|
|
import com.google.android.material.button.MaterialButton;
|
|
import com.google.android.material.textview.MaterialTextView;
|
|
import d0.z.d.m;
|
|
import java.util.List;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<ChannelListItem> {
|
|
private int bottomNavHeight;
|
|
private final FragmentManager fragmentManager;
|
|
private Function1<? super Channel, Unit> onCallChannel = WidgetChannelsListAdapter$onCallChannel$1.INSTANCE;
|
|
private Function2<? super Channel, ? super Boolean, Unit> onCollapseCategory = WidgetChannelsListAdapter$onCollapseCategory$1.INSTANCE;
|
|
private Function1<? super Channel, Unit> onJoinStageChannel = WidgetChannelsListAdapter$onJoinStageChannel$1.INSTANCE;
|
|
private Function1<? super Channel, Unit> onSelectChannel = WidgetChannelsListAdapter$onSelectChannel$1.INSTANCE;
|
|
private Function1<? super Channel, Unit> onSelectChannelOptions = WidgetChannelsListAdapter$onSelectChannelOptions$1.INSTANCE;
|
|
private Function1<? super View, Unit> onSelectInvite = WidgetChannelsListAdapter$onSelectInvite$1.INSTANCE;
|
|
private Function2<? super User, ? super Channel, Unit> onSelectUserOptions = WidgetChannelsListAdapter$onSelectUserOptions$1.INSTANCE;
|
|
private Function1<? super Channel, Unit> onViewGuildScheduledEvents = WidgetChannelsListAdapter$onViewGuildScheduledEvents$1.INSTANCE;
|
|
private long selectedGuildId;
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static abstract class Item extends MGRecyclerViewHolder<WidgetChannelsListAdapter, ChannelListItem> {
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public Item(@LayoutRes int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
}
|
|
|
|
public final void setBackground(View view, boolean z2, Channel channel) {
|
|
int i;
|
|
m.checkNotNullParameter(view, "$this$setBackground");
|
|
m.checkNotNullParameter(channel, "channel");
|
|
if (!z2 || AnimatableValueParser.m1(channel)) {
|
|
Context context = view.getContext();
|
|
m.checkNotNullExpressionValue(context, "context");
|
|
i = DrawableCompat.getThemedDrawableRes$default(context, 2130969207, 0, 2, (Object) null);
|
|
} else {
|
|
Context context2 = view.getContext();
|
|
m.checkNotNullExpressionValue(context2, "context");
|
|
i = DrawableCompat.getThemedDrawableRes$default(context2, 2130969208, 0, 2, (Object) null);
|
|
}
|
|
ViewExtensions.setBackgroundAndKeepPadding(view, ContextCompat.getDrawable(view.getContext(), i));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelAddServer extends Item {
|
|
private final WidgetChannelsListItemDirectoryBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelAddServer(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
WidgetChannelsListItemDirectoryBinding a = WidgetChannelsListItemDirectoryBinding.a(this.itemView);
|
|
m.checkNotNullExpressionValue(a, "WidgetChannelsListItemDi…oryBinding.bind(itemView)");
|
|
this.binding = a;
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
if (channelListItem instanceof ChannelListItemAddServer) {
|
|
this.binding.f1719c.setText(2131890262);
|
|
this.binding.b.setImageResource(2131231379);
|
|
LinearLayout linearLayout = this.binding.a;
|
|
linearLayout.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelAddServer$onConfigure$1$1(linearLayout));
|
|
}
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelCategory extends Item {
|
|
private static final long ANIMATION_DURATION = 300;
|
|
private static final RotateAnimation ARROW_ANIM_COLLAPSE;
|
|
private static final RotateAnimation ARROW_ANIM_EXPAND;
|
|
public static final Companion Companion;
|
|
private final WidgetChannelsListItemCategoryBinding binding;
|
|
private boolean isCollapsed;
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public static final /* synthetic */ RotateAnimation access$getAnimation(Companion companion, boolean z2) {
|
|
return companion.getAnimation(z2);
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getArrowDrawable(Companion companion, ChannelListItemCategory channelListItemCategory) {
|
|
return companion.getArrowDrawable(channelListItemCategory);
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getChannelColor(Companion companion, ChannelListItemCategory channelListItemCategory, Context context) {
|
|
return companion.getChannelColor(channelListItemCategory, context);
|
|
}
|
|
|
|
private final RotateAnimation getAnimation(boolean z2) {
|
|
RotateAnimation rotateAnimation = new RotateAnimation(z2 ? -90.0f : 90.0f, 0.0f, 1, 0.5f, 1, 0.5f);
|
|
rotateAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
|
|
rotateAnimation.setDuration(300);
|
|
return rotateAnimation;
|
|
}
|
|
|
|
@DrawableRes
|
|
private final int getArrowDrawable(ChannelListItemCategory channelListItemCategory) {
|
|
if (channelListItemCategory.isCollapsed()) {
|
|
return 2131231531;
|
|
}
|
|
return !channelListItemCategory.isCollapsed() ? 2131231527 : 0;
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getChannelColor(ChannelListItemCategory channelListItemCategory, Context context) {
|
|
return channelListItemCategory.isMuted() ? ColorCompat.getThemedColor(context, 2130968948) : ColorCompat.getThemedColor(context, 2130968910);
|
|
}
|
|
}
|
|
|
|
static {
|
|
Companion companion = new Companion(null);
|
|
Companion = companion;
|
|
ARROW_ANIM_EXPAND = Companion.access$getAnimation(companion, true);
|
|
ARROW_ANIM_COLLAPSE = Companion.access$getAnimation(companion, false);
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelCategory(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362395;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362395);
|
|
if (imageView != null) {
|
|
i2 = 2131362396;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131362396);
|
|
if (imageView2 != null) {
|
|
i2 = 2131362397;
|
|
TextView textView = (TextView) view.findViewById(2131362397);
|
|
if (textView != null) {
|
|
WidgetChannelsListItemCategoryBinding widgetChannelsListItemCategoryBinding = new WidgetChannelsListItemCategoryBinding((LinearLayout) view, imageView, imageView2, textView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemCategoryBinding, "WidgetChannelsListItemCa…oryBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemCategoryBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelCategory itemChannelCategory) {
|
|
return (WidgetChannelsListAdapter) itemChannelCategory.adapter;
|
|
}
|
|
|
|
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0078: APUT
|
|
(r3v1 java.lang.Object[])
|
|
(1 ??[boolean, int, float, short, byte, char])
|
|
(wrap: java.lang.CharSequence : 0x0074: INVOKE (r6v2 java.lang.CharSequence) =
|
|
(r6v1 android.widget.TextView)
|
|
(r7v1 int)
|
|
(wrap: java.lang.Object[] : 0x0070: NEW_ARRAY (r8v0 java.lang.Object[]) = (0 int) type: java.lang.Object[])
|
|
(null kotlin.jvm.functions.Function1)
|
|
(4 int)
|
|
type: STATIC call: c.a.k.b.i(android.view.View, int, java.lang.Object[], kotlin.jvm.functions.Function1, int):java.lang.CharSequence)
|
|
*/
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemCategory channelListItemCategory = (ChannelListItemCategory) channelListItem;
|
|
LinearLayout linearLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(linearLayout, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(linearLayout, new WidgetChannelsListAdapter$ItemChannelCategory$onConfigure$1(this, channelListItem));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelCategory$onConfigure$2(this, channelListItem));
|
|
TextView textView = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsItemCategoryName");
|
|
textView.setText(AnimatableValueParser.y0(channelListItemCategory.getChannel()));
|
|
TextView textView2 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView2, "binding.channelsItemCategoryName");
|
|
TextView textView3 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView3, "binding.channelsItemCategoryName");
|
|
Object[] objArr = new Object[2];
|
|
int i2 = 0;
|
|
objArr[0] = AnimatableValueParser.y0(channelListItemCategory.getChannel());
|
|
TextView textView4 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView4, "binding.channelsItemCategoryName");
|
|
objArr[1] = b.i(textView4, channelListItemCategory.isCollapsed() ? 2131887419 : 2131888467, new Object[0], null, 4);
|
|
textView2.setContentDescription(b.i(textView3, 2131887204, objArr, null, 4));
|
|
Companion companion = Companion;
|
|
TextView textView5 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView5, "binding.channelsItemCategoryName");
|
|
Context context = textView5.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.channelsItemCategoryName.context");
|
|
int access$getChannelColor = Companion.access$getChannelColor(companion, channelListItemCategory, context);
|
|
this.binding.d.setTextColor(access$getChannelColor);
|
|
ViewCompat.setAccessibilityDelegate(this.binding.d, new WidgetChannelsListAdapter$ItemChannelCategory$onConfigure$3());
|
|
this.binding.f1714c.setImageResource(Companion.access$getArrowDrawable(companion, channelListItemCategory));
|
|
ImageView imageView = this.binding.f1714c;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsItemCategoryArrow");
|
|
imageView.setImageTintList(ColorStateList.valueOf(access$getChannelColor));
|
|
if (this.isCollapsed != channelListItemCategory.isCollapsed()) {
|
|
this.isCollapsed = channelListItemCategory.isCollapsed();
|
|
this.binding.f1714c.startAnimation(channelListItemCategory.isCollapsed() ? ARROW_ANIM_COLLAPSE : ARROW_ANIM_EXPAND);
|
|
}
|
|
ImageView imageView2 = this.binding.b;
|
|
m.checkNotNullExpressionValue(imageView2, "binding.channelsItemCategoryAdd");
|
|
if (!channelListItemCategory.getCanManageChannels()) {
|
|
i2 = 8;
|
|
}
|
|
imageView2.setVisibility(i2);
|
|
ImageView imageView3 = this.binding.b;
|
|
m.checkNotNullExpressionValue(imageView3, "binding.channelsItemCategoryAdd");
|
|
imageView3.setImageTintList(ColorStateList.valueOf(access$getChannelColor));
|
|
this.binding.b.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelCategory$onConfigure$4(this, channelListItemCategory));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelDirectory extends Item {
|
|
private final WidgetChannelsListItemDirectoryBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelDirectory(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
WidgetChannelsListItemDirectoryBinding a = WidgetChannelsListItemDirectoryBinding.a(this.itemView);
|
|
m.checkNotNullExpressionValue(a, "WidgetChannelsListItemDi…oryBinding.bind(itemView)");
|
|
this.binding = a;
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelDirectory itemChannelDirectory) {
|
|
return (WidgetChannelsListAdapter) itemChannelDirectory.adapter;
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemDirectory channelListItemDirectory = (ChannelListItemDirectory) channelListItem;
|
|
TextView textView = this.binding.f1719c;
|
|
m.checkNotNullExpressionValue(textView, "binding.directoryChannelName");
|
|
textView.setText(AnimatableValueParser.y0(channelListItemDirectory.getChannel()));
|
|
LinearLayout linearLayout = this.binding.a;
|
|
linearLayout.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelDirectory$onConfigure$$inlined$apply$lambda$1(this, channelListItemDirectory));
|
|
linearLayout.setSelected(channelListItemDirectory.getSelected());
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelPrivate extends Item {
|
|
private final WidgetChannelsListItemChannelPrivateBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelPrivate(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362293;
|
|
StatusView statusView = (StatusView) view.findViewById(2131362293);
|
|
if (statusView != null) {
|
|
i2 = 2131362430;
|
|
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(2131362430);
|
|
if (simpleDraweeView != null) {
|
|
i2 = 2131362431;
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView = (SimpleDraweeSpanTextView) view.findViewById(2131362431);
|
|
if (simpleDraweeSpanTextView != null) {
|
|
i2 = 2131362432;
|
|
TextView textView = (TextView) view.findViewById(2131362432);
|
|
if (textView != null) {
|
|
i2 = 2131362433;
|
|
TextView textView2 = (TextView) view.findViewById(2131362433);
|
|
if (textView2 != null) {
|
|
i2 = 2131362434;
|
|
TextView textView3 = (TextView) view.findViewById(2131362434);
|
|
if (textView3 != null) {
|
|
WidgetChannelsListItemChannelPrivateBinding widgetChannelsListItemChannelPrivateBinding = new WidgetChannelsListItemChannelPrivateBinding((RelativeLayout) view, statusView, simpleDraweeView, simpleDraweeSpanTextView, textView, textView2, textView3);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemChannelPrivateBinding, "WidgetChannelsListItemCh…ateBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemChannelPrivateBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelPrivate itemChannelPrivate) {
|
|
return (WidgetChannelsListAdapter) itemChannelPrivate.adapter;
|
|
}
|
|
|
|
private final CharSequence getContentDescription(ChannelListItemPrivate channelListItemPrivate, CharSequence charSequence) {
|
|
if (AnimatableValueParser.k1(channelListItemPrivate.getChannel()) && channelListItemPrivate.getMentionCount() > 0) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return b.i(view, 2131889171, new Object[]{charSequence}, null, 4);
|
|
} else if (AnimatableValueParser.k1(channelListItemPrivate.getChannel())) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return b.i(view2, 2131889170, new Object[]{charSequence}, null, 4);
|
|
} else if (channelListItemPrivate.getMentionCount() > 0) {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return b.i(view3, 2131888120, new Object[]{charSequence}, null, 4);
|
|
} else {
|
|
View view4 = this.itemView;
|
|
m.checkNotNullExpressionValue(view4, "itemView");
|
|
return b.i(view4, 2131888119, new Object[]{charSequence}, null, 4);
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(wrap: int : 0x000d: ARITH (r5v3 int) = (r5v2 int) + (1 int)), (' ' char), (r6v1 java.lang.CharSequence)] */
|
|
@SuppressLint({"SetTextI18n"})
|
|
private final String getMemberCount(Channel channel, Context context) {
|
|
List<com.discord.api.user.User> w = channel.w();
|
|
int size = w != null ? w.size() : 0;
|
|
CharSequence g = b.g(context, 2131891292, new Object[0], null, 4);
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(size + 1);
|
|
sb.append(' ');
|
|
sb.append(g);
|
|
return sb.toString();
|
|
}
|
|
|
|
private final int getPresenceBg(boolean z2) {
|
|
if (z2) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return ColorCompat.getThemedColor(view, 2130968993);
|
|
}
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return ColorCompat.getThemedColor(view2, 2130968905);
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getTextColor(ChannelListItemPrivate channelListItemPrivate) {
|
|
if (channelListItemPrivate.getSelected()) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return ColorCompat.getThemedColor(view, 2130968946);
|
|
} else if (channelListItemPrivate.getMuted()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return ColorCompat.getThemedColor(view2, 2130968948);
|
|
} else {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return ColorCompat.getThemedColor(view3, 2130968910);
|
|
}
|
|
}
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:27:0x016b */
|
|
/* JADX WARNING: Removed duplicated region for block: B:28:0x016d */
|
|
/* JADX WARNING: Removed duplicated region for block: B:30:0x0170 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:31:0x0172 */
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
String str;
|
|
String str2;
|
|
boolean z2;
|
|
int i2;
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemPrivate channelListItemPrivate = (ChannelListItemPrivate) channelListItem;
|
|
Channel component1 = channelListItemPrivate.component1();
|
|
Presence component2 = channelListItemPrivate.component2();
|
|
boolean component3 = channelListItemPrivate.component3();
|
|
int component4 = channelListItemPrivate.component4();
|
|
boolean component5 = channelListItemPrivate.component5();
|
|
if (AnimatableValueParser.h1(component1)) {
|
|
str = AnimatableValueParser.y0(component1);
|
|
} else {
|
|
TextView textView = this.binding.f;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsListItemPrivateName");
|
|
Context context = textView.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.channelsListItemPrivateName.context");
|
|
str = AnimatableValueParser.A0(component1, context, false, 2);
|
|
}
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout, new WidgetChannelsListAdapter$ItemChannelPrivate$onConfigure$1(this, channelListItem));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelPrivate$onConfigure$2(this, channelListItem));
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
relativeLayout2.setContentDescription(getContentDescription(channelListItemPrivate, str));
|
|
TextView textView2 = this.binding.f;
|
|
m.checkNotNullExpressionValue(textView2, "binding.channelsListItemPrivateName");
|
|
textView2.setText(str);
|
|
this.binding.f.setTextColor(getTextColor(channelListItemPrivate));
|
|
TextView textView3 = this.binding.g;
|
|
m.checkNotNullExpressionValue(textView3, "binding.channelsListItemPrivateTag");
|
|
textView3.setVisibility(AnimatableValueParser.y1(component1) ? 0 : 8);
|
|
SimpleDraweeView simpleDraweeView = this.binding.f1716c;
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "it");
|
|
IconUtils.setIcon$default(simpleDraweeView, component1, 2131165296, null, 8, null);
|
|
StatusView statusView = this.binding.b;
|
|
m.checkNotNullExpressionValue(statusView, "binding.channelListItemPrivateStatus");
|
|
statusView.setVisibility(AnimatableValueParser.h1(component1) && !AnimatableValueParser.y1(component1) ? 0 : 8);
|
|
this.binding.b.setPresence(component2);
|
|
this.binding.b.setBackgroundColor(getPresenceBg(component3));
|
|
if (AnimatableValueParser.y1(component1)) {
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView = this.binding.d;
|
|
m.checkNotNullExpressionValue(simpleDraweeSpanTextView, "binding.channelsListItemPrivateDesc");
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView2 = this.binding.d;
|
|
m.checkNotNullExpressionValue(simpleDraweeSpanTextView2, "binding.channelsListItemPrivateDesc");
|
|
ViewExtensions.setTextAndVisibilityBy(simpleDraweeSpanTextView, b.i(simpleDraweeSpanTextView2, 2131893939, new Object[0], null, 4));
|
|
} else if (AnimatableValueParser.r1(component1)) {
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView3 = this.binding.d;
|
|
m.checkNotNullExpressionValue(simpleDraweeSpanTextView3, "binding.channelsListItemPrivateDesc");
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView4 = this.binding.d;
|
|
m.checkNotNullExpressionValue(simpleDraweeSpanTextView4, "binding.channelsListItemPrivateDesc");
|
|
Context context2 = simpleDraweeSpanTextView4.getContext();
|
|
m.checkNotNullExpressionValue(context2, "binding.channelsListItemPrivateDesc.context");
|
|
ViewExtensions.setTextAndVisibilityBy(simpleDraweeSpanTextView3, getMemberCount(component1, context2));
|
|
} else {
|
|
SimpleDraweeSpanTextView simpleDraweeSpanTextView5 = this.binding.d;
|
|
m.checkNotNullExpressionValue(simpleDraweeSpanTextView5, "binding.channelsListItemPrivateDesc");
|
|
str2 = "binding.root";
|
|
i2 = component4;
|
|
z2 = component3;
|
|
PresenceUtils.setPresenceText$default(component2, component5, simpleDraweeSpanTextView5, false, false, 24, null);
|
|
TextView textView4 = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView4, "binding.channelsListItemPrivateMentions");
|
|
textView4.setText(String.valueOf(Math.min(99, i2)));
|
|
TextView textView5 = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView5, "binding.channelsListItemPrivateMentions");
|
|
textView5.setVisibility(!(i2 <= 0) ? 0 : 8);
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, str2);
|
|
relativeLayout3.setSelected(z2);
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, str2);
|
|
setBackground(relativeLayout4, z2, component1);
|
|
}
|
|
str2 = "binding.root";
|
|
i2 = component4;
|
|
z2 = component3;
|
|
TextView textView4 = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView4, "binding.channelsListItemPrivateMentions");
|
|
textView4.setText(String.valueOf(Math.min(99, i2)));
|
|
TextView textView5 = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView5, "binding.channelsListItemPrivateMentions");
|
|
textView5.setVisibility(!(i2 <= 0) ? 0 : 8);
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, str2);
|
|
relativeLayout3.setSelected(z2);
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, str2);
|
|
setBackground(relativeLayout4, z2, component1);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelStageVoice extends Item {
|
|
public static final Companion Companion = new Companion(null);
|
|
private final WidgetChannelsListItemChannelStageVoiceBinding binding;
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getVoiceChannelColor(Companion companion, boolean z2, Context context) {
|
|
return companion.getVoiceChannelColor(z2, context);
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getVoiceChannelColor(boolean z2, Context context) {
|
|
return z2 ? ColorCompat.getThemedColor(context, 2130968946) : ColorCompat.getThemedColor(context, 2130968910);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelStageVoice(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131365101;
|
|
ImageView imageView = (ImageView) view.findViewById(2131365101);
|
|
if (imageView != null) {
|
|
i2 = 2131365102;
|
|
TextView textView = (TextView) view.findViewById(2131365102);
|
|
if (textView != null) {
|
|
i2 = 2131365103;
|
|
TextView textView2 = (TextView) view.findViewById(2131365103);
|
|
if (textView2 != null) {
|
|
WidgetChannelsListItemChannelStageVoiceBinding widgetChannelsListItemChannelStageVoiceBinding = new WidgetChannelsListItemChannelStageVoiceBinding((RelativeLayout) view, imageView, textView, textView2);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemChannelStageVoiceBinding, "WidgetChannelsListItemCh…iceBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemChannelStageVoiceBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelStageVoice itemChannelStageVoice) {
|
|
return (WidgetChannelsListAdapter) itemChannelStageVoice.adapter;
|
|
}
|
|
|
|
private final CharSequence getContentDescription(ChannelListVocalItem channelListVocalItem, int i) {
|
|
if (i > 0) {
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
return b.i(relativeLayout, 2131889994, new Object[]{AnimatableValueParser.y0(channelListVocalItem.getChannel()), Integer.valueOf(channelListVocalItem.getNumUsersConnected()), Integer.valueOf(i)}, null, 4);
|
|
} else if (channelListVocalItem.getNumUsersConnected() > 0) {
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, "binding.root");
|
|
Context context = relativeLayout3.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.root.context");
|
|
return b.i(relativeLayout2, 2131889995, new Object[]{AnimatableValueParser.y0(channelListVocalItem.getChannel()), StringResourceUtilsKt.getI18nPluralString(context, 2131755174, channelListVocalItem.getNumUsersConnected(), Integer.valueOf(channelListVocalItem.getNumUsersConnected()))}, null, 4);
|
|
} else {
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, "binding.root");
|
|
return b.i(relativeLayout4, 2131889993, new Object[]{AnimatableValueParser.y0(channelListVocalItem.getChannel())}, null, 4);
|
|
}
|
|
}
|
|
|
|
@SuppressLint({"SetTextI18n"})
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
ColorStateList colorStateList;
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemStageVoiceChannel channelListItemStageVoiceChannel = (ChannelListItemStageVoiceChannel) channelListItem;
|
|
Channel component1 = channelListItemStageVoiceChannel.component1();
|
|
boolean component2 = channelListItemStageVoiceChannel.component2();
|
|
Long component3 = channelListItemStageVoiceChannel.component3();
|
|
boolean component4 = channelListItemStageVoiceChannel.component4();
|
|
StageInstance component6 = channelListItemStageVoiceChannel.component6();
|
|
boolean z2 = true;
|
|
int i2 = 0;
|
|
boolean z3 = component6 != null;
|
|
boolean can = PermissionUtils.can(1048576, component3);
|
|
Companion companion = Companion;
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
Context context = view.getContext();
|
|
m.checkNotNullExpressionValue(context, "itemView.context");
|
|
int access$getVoiceChannelColor = Companion.access$getVoiceChannelColor(companion, component2, context);
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelStageVoice$onConfigure$1(this, channelListItem));
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
relativeLayout.setSelected(component2);
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
setBackground(relativeLayout2, component2, component1);
|
|
TextView textView = this.binding.f1717c;
|
|
textView.setText(AnimatableValueParser.y0(component1));
|
|
textView.setTextColor(access$getVoiceChannelColor);
|
|
TextView textView2 = this.binding.d;
|
|
if (!z3 || !can) {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
i2 = 8;
|
|
}
|
|
textView2.setVisibility(i2);
|
|
textView2.setText(component6 != null ? component6.f() : null);
|
|
int i3 = !can ? 2131231490 : component4 ? 2131231497 : 2131231493;
|
|
ImageView imageView = this.binding.b;
|
|
imageView.setImageResource(i3);
|
|
if (!z3 || !can) {
|
|
colorStateList = ColorStateList.valueOf(access$getVoiceChannelColor);
|
|
} else {
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, "binding.root");
|
|
colorStateList = ColorStateList.valueOf(ColorCompat.getColor(relativeLayout3.getContext(), 2131100249));
|
|
}
|
|
imageView.setImageTintList(colorStateList);
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, "binding.root");
|
|
relativeLayout4.setContentDescription(getContentDescription((ChannelListVocalItem) channelListItem, component1.B()));
|
|
RelativeLayout relativeLayout5 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout5, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout5, new WidgetChannelsListAdapter$ItemChannelStageVoice$onConfigure$5(this, component1));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelText extends Item {
|
|
private final WidgetChannelsListItemChannelBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelText(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362398;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362398);
|
|
if (imageView != null) {
|
|
i2 = 2131362399;
|
|
TextView textView = (TextView) view.findViewById(2131362399);
|
|
if (textView != null) {
|
|
i2 = 2131362400;
|
|
TextView textView2 = (TextView) view.findViewById(2131362400);
|
|
if (textView2 != null) {
|
|
i2 = 2131362401;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131362401);
|
|
if (imageView2 != null) {
|
|
WidgetChannelsListItemChannelBinding widgetChannelsListItemChannelBinding = new WidgetChannelsListItemChannelBinding((RelativeLayout) view, imageView, textView, textView2, imageView2);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemChannelBinding, "WidgetChannelsListItemCh…nelBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemChannelBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelText itemChannelText) {
|
|
return (WidgetChannelsListAdapter) itemChannelText.adapter;
|
|
}
|
|
|
|
@DrawableRes
|
|
private final int getAnnouncementsIcon(ChannelListItemTextChannel channelListItemTextChannel) {
|
|
return channelListItemTextChannel.getChannel().o() ? channelListItemTextChannel.getHasActiveThreads() ? 2131231489 : 2131231486 : channelListItemTextChannel.isLocked() ? channelListItemTextChannel.getHasActiveThreads() ? 2131231488 : 2131231485 : channelListItemTextChannel.getHasActiveThreads() ? 2131231487 : 2131231483;
|
|
}
|
|
|
|
private final CharSequence getContentDescription(ChannelListItemTextChannel channelListItemTextChannel, boolean z2) {
|
|
if (z2 && channelListItemTextChannel.getMentionCount() > 0) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return b.i(view, 2131889984, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), 2131755171, channelListItemTextChannel.getMentionCount(), Integer.valueOf(channelListItemTextChannel.getMentionCount())), AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
} else if (z2 && channelListItemTextChannel.isUnread()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return b.i(view2, 2131889985, new Object[]{AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
} else if (z2) {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return b.i(view3, 2131889983, new Object[]{AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
} else if (channelListItemTextChannel.getMentionCount() > 0) {
|
|
View view4 = this.itemView;
|
|
m.checkNotNullExpressionValue(view4, "itemView");
|
|
return b.i(view4, 2131889987, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), 2131755172, channelListItemTextChannel.getMentionCount(), Integer.valueOf(channelListItemTextChannel.getMentionCount())), AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
} else if (channelListItemTextChannel.isUnread()) {
|
|
View view5 = this.itemView;
|
|
m.checkNotNullExpressionValue(view5, "itemView");
|
|
return b.i(view5, 2131889988, new Object[]{AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
} else {
|
|
View view6 = this.itemView;
|
|
m.checkNotNullExpressionValue(view6, "itemView");
|
|
return b.i(view6, 2131889986, new Object[]{AnimatableValueParser.y0(channelListItemTextChannel.getChannel())}, null, 4);
|
|
}
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getHashColor(ChannelListItemTextChannel channelListItemTextChannel) {
|
|
if (channelListItemTextChannel.getMuted()) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return ColorCompat.getThemedColor(view, 2130968948);
|
|
} else if (channelListItemTextChannel.isUnread()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return ColorCompat.getThemedColor(view2, 2130968946);
|
|
} else {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return ColorCompat.getThemedColor(view3, 2130968910);
|
|
}
|
|
}
|
|
|
|
@DrawableRes
|
|
private final int getHashIcon(ChannelListItemTextChannel channelListItemTextChannel) {
|
|
return channelListItemTextChannel.getChannel().o() ? channelListItemTextChannel.getHasActiveThreads() ? 2131232022 : 2131231503 : channelListItemTextChannel.isLocked() ? channelListItemTextChannel.getHasActiveThreads() ? 2131232021 : 2131231502 : channelListItemTextChannel.getHasActiveThreads() ? 2131232019 : 2131231498;
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getTextColor(ChannelListItemTextChannel channelListItemTextChannel, boolean z2) {
|
|
if (z2) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return ColorCompat.getThemedColor(view, 2130968946);
|
|
} else if (channelListItemTextChannel.getMuted()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return ColorCompat.getThemedColor(view2, 2130968948);
|
|
} else if (channelListItemTextChannel.isUnread()) {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return ColorCompat.getThemedColor(view3, 2130968946);
|
|
} else {
|
|
View view4 = this.itemView;
|
|
m.checkNotNullExpressionValue(view4, "itemView");
|
|
return ColorCompat.getThemedColor(view4, 2130968910);
|
|
}
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemTextChannel channelListItemTextChannel = (ChannelListItemTextChannel) channelListItem;
|
|
boolean z2 = true;
|
|
int i2 = 0;
|
|
boolean z3 = channelListItemTextChannel.getChannel().A() == 5;
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout, new WidgetChannelsListAdapter$ItemChannelText$onConfigure$1(this, channelListItem));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelText$onConfigure$2(this, channelListItem));
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
setBackground(relativeLayout2, channelListItemTextChannel.getSelected(), channelListItemTextChannel.getChannel());
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, "binding.root");
|
|
relativeLayout3.setContentDescription(getContentDescription(channelListItemTextChannel, z3));
|
|
TextView textView = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsItemChannelName");
|
|
textView.setText(AnimatableValueParser.y0(channelListItemTextChannel.getChannel()));
|
|
this.binding.d.setTextColor(getTextColor(channelListItemTextChannel, channelListItemTextChannel.getSelected()));
|
|
this.binding.b.setImageResource(z3 ? getAnnouncementsIcon(channelListItemTextChannel) : getHashIcon(channelListItemTextChannel));
|
|
ImageView imageView = this.binding.b;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsItemChannelHash");
|
|
imageView.setImageTintList(ColorStateList.valueOf(getHashColor(channelListItemTextChannel)));
|
|
TextView textView2 = this.binding.f1715c;
|
|
m.checkNotNullExpressionValue(textView2, "binding.channelsItemChannelMentions");
|
|
textView2.setVisibility(channelListItemTextChannel.getMentionCount() > 0 ? 0 : 8);
|
|
TextView textView3 = this.binding.f1715c;
|
|
m.checkNotNullExpressionValue(textView3, "binding.channelsItemChannelMentions");
|
|
textView3.setText(String.valueOf(Math.min(99, channelListItemTextChannel.getMentionCount())));
|
|
ImageView imageView2 = this.binding.e;
|
|
m.checkNotNullExpressionValue(imageView2, "binding.channelsItemChannelUnread");
|
|
if (!channelListItemTextChannel.isUnread() || channelListItemTextChannel.getSelected() || channelListItemTextChannel.getMuted()) {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
i2 = 8;
|
|
}
|
|
imageView2.setVisibility(i2);
|
|
TextView textView4 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView4, "binding.channelsItemChannelName");
|
|
FontUtils fontUtils = FontUtils.INSTANCE;
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, "binding.root");
|
|
Context context = relativeLayout4.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.root.context");
|
|
textView4.setTypeface(fontUtils.getThemedFont(context, (channelListItemTextChannel.isUnread() || channelListItemTextChannel.getSelected()) ? 2130969326 : 2130969325));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelThread extends Item {
|
|
private final WidgetChannelsListItemThreadBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelThread(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362402;
|
|
ConstraintLayout constraintLayout = (ConstraintLayout) view.findViewById(2131362402);
|
|
if (constraintLayout != null) {
|
|
i2 = 2131362403;
|
|
TextView textView = (TextView) view.findViewById(2131362403);
|
|
if (textView != null) {
|
|
i2 = 2131362404;
|
|
TextView textView2 = (TextView) view.findViewById(2131362404);
|
|
if (textView2 != null) {
|
|
i2 = 2131362405;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362405);
|
|
if (imageView != null) {
|
|
i2 = 2131362406;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131362406);
|
|
if (imageView2 != null) {
|
|
WidgetChannelsListItemThreadBinding widgetChannelsListItemThreadBinding = new WidgetChannelsListItemThreadBinding((ConstraintLayout) view, constraintLayout, textView, textView2, imageView, imageView2);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemThreadBinding, "WidgetChannelsListItemThreadBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemThreadBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelThread itemChannelThread) {
|
|
return (WidgetChannelsListAdapter) itemChannelThread.adapter;
|
|
}
|
|
|
|
private final CharSequence getContentDescription(ChannelListItemThread channelListItemThread) {
|
|
if (channelListItemThread.getMentionCount() > 0) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return b.i(view, 2131889987, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), 2131755172, channelListItemThread.getMentionCount(), Integer.valueOf(channelListItemThread.getMentionCount())), channelListItemThread.getChannel().m()}, null, 4);
|
|
} else if (channelListItemThread.isUnread()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return b.i(view2, 2131889988, new Object[]{channelListItemThread.getChannel().m()}, null, 4);
|
|
} else {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return b.i(view3, 2131889986, new Object[]{channelListItemThread.getChannel().m()}, null, 4);
|
|
}
|
|
}
|
|
|
|
private final int getSpineResourceId(WidgetChannelListModel.ThreadSpineType threadSpineType) {
|
|
if (m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.Single.INSTANCE)) {
|
|
return 2131231971;
|
|
}
|
|
if (m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.Start.INSTANCE)) {
|
|
return 2131231969;
|
|
}
|
|
return m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.End.INSTANCE) ? 2131231972 : 2131231970;
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getTextColor(ChannelListItemThread channelListItemThread, boolean z2) {
|
|
if (z2) {
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
return ColorCompat.getThemedColor(view, 2130968946);
|
|
} else if (channelListItemThread.isUnread()) {
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
return ColorCompat.getThemedColor(view2, 2130968946);
|
|
} else {
|
|
View view3 = this.itemView;
|
|
m.checkNotNullExpressionValue(view3, "itemView");
|
|
return ColorCompat.getThemedColor(view3, 2130968910);
|
|
}
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemThread channelListItemThread = (ChannelListItemThread) channelListItem;
|
|
ConstraintLayout constraintLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(constraintLayout, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(constraintLayout, new WidgetChannelsListAdapter$ItemChannelThread$onConfigure$1(this, channelListItem));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelThread$onConfigure$2(this, channelListItem));
|
|
ConstraintLayout constraintLayout2 = this.binding.b;
|
|
m.checkNotNullExpressionValue(constraintLayout2, "binding.channelsItemThreadContent");
|
|
setBackground(constraintLayout2, channelListItemThread.getSelected(), channelListItemThread.getChannel());
|
|
ConstraintLayout constraintLayout3 = this.binding.b;
|
|
m.checkNotNullExpressionValue(constraintLayout3, "binding.channelsItemThreadContent");
|
|
constraintLayout3.setContentDescription(getContentDescription(channelListItemThread));
|
|
TextView textView = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsItemThreadName");
|
|
textView.setText(channelListItemThread.getChannel().m());
|
|
this.binding.d.setTextColor(getTextColor(channelListItemThread, channelListItemThread.getSelected()));
|
|
TextView textView2 = this.binding.f1722c;
|
|
m.checkNotNullExpressionValue(textView2, "binding.channelsItemThreadMentions");
|
|
boolean z2 = true;
|
|
int i2 = 0;
|
|
textView2.setVisibility(channelListItemThread.getMentionCount() > 0 ? 0 : 8);
|
|
TextView textView3 = this.binding.f1722c;
|
|
m.checkNotNullExpressionValue(textView3, "binding.channelsItemThreadMentions");
|
|
textView3.setText(String.valueOf(Math.min(99, channelListItemThread.getMentionCount())));
|
|
ImageView imageView = this.binding.f;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsItemThreadUnread");
|
|
if (!channelListItemThread.isUnread() || channelListItemThread.getSelected()) {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
i2 = 8;
|
|
}
|
|
imageView.setVisibility(i2);
|
|
TextView textView4 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView4, "binding.channelsItemThreadName");
|
|
FontUtils fontUtils = FontUtils.INSTANCE;
|
|
ConstraintLayout constraintLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(constraintLayout4, "binding.root");
|
|
Context context = constraintLayout4.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.root.context");
|
|
textView4.setTypeface(fontUtils.getThemedFont(context, (channelListItemThread.isUnread() || channelListItemThread.getSelected()) ? 2130969326 : 2130969325));
|
|
this.binding.e.setImageResource(getSpineResourceId(channelListItemThread.getSpineType()));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemChannelVoice extends Item {
|
|
public static final Companion Companion = new Companion(null);
|
|
private final WidgetChannelsListItemChannelVoiceBinding binding;
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getVoiceChannelColor(Companion companion, boolean z2, Context context) {
|
|
return companion.getVoiceChannelColor(z2, context);
|
|
}
|
|
|
|
@ColorInt
|
|
private final int getVoiceChannelColor(boolean z2, Context context) {
|
|
return z2 ? ColorCompat.getThemedColor(context, 2130968946) : ColorCompat.getThemedColor(context, 2130968910);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemChannelVoice(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362407;
|
|
TextView textView = (TextView) view.findViewById(2131362407);
|
|
if (textView != null) {
|
|
i2 = 2131362408;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362408);
|
|
if (imageView != null) {
|
|
i2 = 2131362409;
|
|
VoiceUserLimitView voiceUserLimitView = (VoiceUserLimitView) view.findViewById(2131362409);
|
|
if (voiceUserLimitView != null) {
|
|
WidgetChannelsListItemChannelVoiceBinding widgetChannelsListItemChannelVoiceBinding = new WidgetChannelsListItemChannelVoiceBinding((RelativeLayout) view, textView, imageView, voiceUserLimitView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemChannelVoiceBinding, "WidgetChannelsListItemCh…iceBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemChannelVoiceBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelVoice itemChannelVoice) {
|
|
return (WidgetChannelsListAdapter) itemChannelVoice.adapter;
|
|
}
|
|
|
|
private final CharSequence getContentDescription(ChannelListItemVoiceChannel channelListItemVoiceChannel, int i) {
|
|
if (i > 0) {
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
return b.i(relativeLayout, 2131889994, new Object[]{AnimatableValueParser.y0(channelListItemVoiceChannel.getChannel()), Integer.valueOf(channelListItemVoiceChannel.getNumUsersConnected()), Integer.valueOf(i)}, null, 4);
|
|
} else if (channelListItemVoiceChannel.getNumUsersConnected() > 0) {
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, "binding.root");
|
|
Context context = relativeLayout3.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.root.context");
|
|
return b.i(relativeLayout2, 2131889995, new Object[]{AnimatableValueParser.y0(channelListItemVoiceChannel.getChannel()), StringResourceUtilsKt.getI18nPluralString(context, 2131755174, channelListItemVoiceChannel.getNumUsersConnected(), Integer.valueOf(channelListItemVoiceChannel.getNumUsersConnected()))}, null, 4);
|
|
} else {
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, "binding.root");
|
|
return b.i(relativeLayout4, 2131889993, new Object[]{AnimatableValueParser.y0(channelListItemVoiceChannel.getChannel())}, null, 4);
|
|
}
|
|
}
|
|
|
|
@SuppressLint({"SetTextI18n"})
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemVoiceChannel channelListItemVoiceChannel = (ChannelListItemVoiceChannel) channelListItem;
|
|
Channel component1 = channelListItemVoiceChannel.component1();
|
|
boolean component2 = channelListItemVoiceChannel.component2();
|
|
Long component3 = channelListItemVoiceChannel.component3();
|
|
int component4 = channelListItemVoiceChannel.component4();
|
|
boolean component5 = channelListItemVoiceChannel.component5();
|
|
boolean component6 = channelListItemVoiceChannel.component6();
|
|
GuildMaxVideoChannelUsers component7 = channelListItemVoiceChannel.component7();
|
|
boolean can = PermissionUtils.can(1048576, component3);
|
|
Companion companion = Companion;
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
Context context = view.getContext();
|
|
m.checkNotNullExpressionValue(context, "itemView.context");
|
|
int access$getVoiceChannelColor = Companion.access$getVoiceChannelColor(companion, component2, context);
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$1(this, channelListItem));
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
relativeLayout.setSelected(component2);
|
|
RelativeLayout relativeLayout2 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout2, "binding.root");
|
|
setBackground(relativeLayout2, component2, component1);
|
|
TextView textView = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsItemVoiceChannelName");
|
|
textView.setText(AnimatableValueParser.y0(component1));
|
|
this.binding.b.setTextColor(access$getVoiceChannelColor);
|
|
this.binding.f1718c.setImageResource(!can ? 2131231490 : component5 ? 2131231510 : 2131231507);
|
|
ImageView imageView = this.binding.f1718c;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsItemVoiceChannelSpeaker");
|
|
imageView.setImageTintList(ColorStateList.valueOf(access$getVoiceChannelColor));
|
|
if (!(component7 instanceof GuildMaxVideoChannelUsers.Limited)) {
|
|
component7 = null;
|
|
}
|
|
GuildMaxVideoChannelUsers.Limited limited = (GuildMaxVideoChannelUsers.Limited) component7;
|
|
int i2 = 0;
|
|
int a = limited != null ? limited.a() : 0;
|
|
int min = Math.min(component1.B(), a);
|
|
if (min > 0) {
|
|
boolean z2 = true;
|
|
boolean z3 = component6 && min == a;
|
|
if (!z3) {
|
|
a = component1.B();
|
|
}
|
|
VoiceUserLimitView voiceUserLimitView = this.binding.d;
|
|
m.checkNotNullExpressionValue(voiceUserLimitView, "binding.channelsItemVoiceChannelUserLimit");
|
|
if (a <= 0 || !can) {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
i2 = 8;
|
|
}
|
|
voiceUserLimitView.setVisibility(i2);
|
|
this.binding.d.a(component4, a, z3);
|
|
RelativeLayout relativeLayout3 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout3, "binding.root");
|
|
relativeLayout3.setContentDescription(getContentDescription(channelListItemVoiceChannel, a));
|
|
} else {
|
|
VoiceUserLimitView voiceUserLimitView2 = this.binding.d;
|
|
m.checkNotNullExpressionValue(voiceUserLimitView2, "binding.channelsItemVoiceChannelUserLimit");
|
|
voiceUserLimitView2.setVisibility(8);
|
|
RelativeLayout relativeLayout4 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout4, "binding.root");
|
|
relativeLayout4.setContentDescription(getContentDescription(channelListItemVoiceChannel, min));
|
|
}
|
|
if (PermissionUtils.can(16, component3)) {
|
|
RelativeLayout relativeLayout5 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout5, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout5, new WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$2(this, component1));
|
|
return;
|
|
}
|
|
RelativeLayout relativeLayout6 = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout6, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout6, WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$3.INSTANCE);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemGuildScheduledEvents extends Item {
|
|
private final WidgetChannelsListItemGuildScheduledEventsBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemGuildScheduledEvents(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362425;
|
|
TextView textView = (TextView) view.findViewById(2131362425);
|
|
if (textView != null) {
|
|
i2 = 2131362426;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362426);
|
|
if (imageView != null) {
|
|
i2 = 2131362427;
|
|
TextView textView2 = (TextView) view.findViewById(2131362427);
|
|
if (textView2 != null) {
|
|
WidgetChannelsListItemGuildScheduledEventsBinding widgetChannelsListItemGuildScheduledEventsBinding = new WidgetChannelsListItemGuildScheduledEventsBinding((ConstraintLayout) view, textView, imageView, textView2);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemGuildScheduledEventsBinding, "WidgetChannelsListItemGu…ntsBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemGuildScheduledEventsBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemGuildScheduledEvents itemGuildScheduledEvents) {
|
|
return (WidgetChannelsListAdapter) itemGuildScheduledEvents.adapter;
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents = (ChannelListItemGuildScheduledEvents) channelListItem;
|
|
TextView textView = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsListItemGuildScheduledEventCount");
|
|
textView.setText(String.valueOf(channelListItemGuildScheduledEvents.getData().size()));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemGuildScheduledEvents$onConfigure$1(this, channelListItemGuildScheduledEvents));
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemHeader extends Item {
|
|
private final WidgetChannelsListItemHeaderBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemHeader(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362428;
|
|
TextView textView = (TextView) view.findViewById(2131362428);
|
|
if (textView != null) {
|
|
i2 = 2131362450;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362450);
|
|
if (imageView != null) {
|
|
WidgetChannelsListItemHeaderBinding widgetChannelsListItemHeaderBinding = new WidgetChannelsListItemHeaderBinding((RelativeLayout) view, textView, imageView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemHeaderBinding, "WidgetChannelsListItemHeaderBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemHeaderBinding;
|
|
return;
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemHeader channelListItemHeader = (ChannelListItemHeader) channelListItem;
|
|
int component2 = channelListItemHeader.component2();
|
|
boolean component3 = channelListItemHeader.component3();
|
|
long component4 = channelListItemHeader.component4();
|
|
if (!component3) {
|
|
ImageView imageView = this.binding.f1720c;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsListNew");
|
|
imageView.setVisibility(4);
|
|
this.binding.f1720c.setOnClickListener(null);
|
|
} else if (component2 == 2131891850) {
|
|
ImageView imageView2 = this.binding.f1720c;
|
|
m.checkNotNullExpressionValue(imageView2, "binding.channelsListNew");
|
|
imageView2.setVisibility(4);
|
|
this.binding.f1720c.setOnClickListener(null);
|
|
} else if (component2 == 2131894048) {
|
|
ImageView imageView3 = this.binding.f1720c;
|
|
m.checkNotNullExpressionValue(imageView3, "binding.channelsListNew");
|
|
imageView3.setVisibility(0);
|
|
this.binding.f1720c.setOnClickListener(new WidgetChannelsListAdapter$ItemHeader$onConfigure$1(component4));
|
|
} else if (component2 == 2131894780) {
|
|
ImageView imageView4 = this.binding.f1720c;
|
|
m.checkNotNullExpressionValue(imageView4, "binding.channelsListNew");
|
|
imageView4.setVisibility(0);
|
|
this.binding.f1720c.setOnClickListener(new WidgetChannelsListAdapter$ItemHeader$onConfigure$2(component4));
|
|
}
|
|
this.binding.b.setText(component2);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemInvite extends Item {
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemInvite(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemInvite itemInvite) {
|
|
return (WidgetChannelsListAdapter) itemInvite.adapter;
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
if (channelListItem instanceof ChannelListItemInvite) {
|
|
this.itemView.setOnClickListener(new WidgetChannelsListAdapter$ItemInvite$onConfigure$1(this, channelListItem));
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(view, new WidgetChannelsListAdapter$ItemInvite$onConfigure$2(this));
|
|
if (((ChannelListItemInvite) channelListItem).isHub()) {
|
|
WidgetChannelsListItemDirectoryBinding a = WidgetChannelsListItemDirectoryBinding.a(this.itemView);
|
|
m.checkNotNullExpressionValue(a, "WidgetChannelsListItemDi…oryBinding.bind(itemView)");
|
|
a.f1719c.setText(2131890620);
|
|
a.b.setImageResource(2131231688);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemMFA extends MGRecyclerViewHolder<WidgetChannelsListAdapter, ChannelListItem> {
|
|
private final WidgetChannelsListItemMfaBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemMFA(@LayoutRes int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
LinkifiedTextView linkifiedTextView = (LinkifiedTextView) view.findViewById(2131362429);
|
|
if (linkifiedTextView != null) {
|
|
WidgetChannelsListItemMfaBinding widgetChannelsListItemMfaBinding = new WidgetChannelsListItemMfaBinding((LinearLayout) view, linkifiedTextView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemMfaBinding, "WidgetChannelsListItemMfaBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemMfaBinding;
|
|
return;
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(2131362429)));
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
LinkifiedTextView linkifiedTextView = this.binding.b;
|
|
m.checkNotNullExpressionValue(linkifiedTextView, "binding.channelsListItemMfaText");
|
|
b.l(linkifiedTextView, 2131894237, new Object[0], WidgetChannelsListAdapter$ItemMFA$onConfigure$1.INSTANCE);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemSpace extends MGRecyclerViewHolder<WidgetChannelsListAdapter, ChannelListItem> {
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemSpace(@LayoutRes int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
|
|
layoutParams.height = WidgetChannelsListAdapter.access$getBottomNavHeight$p((WidgetChannelsListAdapter) this.adapter);
|
|
View view2 = this.itemView;
|
|
m.checkNotNullExpressionValue(view2, "itemView");
|
|
view2.setLayoutParams(layoutParams);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemStageActiveEvent extends Item {
|
|
private final WidgetChannelsListItemActiveStageEventBinding binding;
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
/* renamed from: com.discord.widgets.channels.list.WidgetChannelsListAdapter$ItemStageActiveEvent$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 implements View.OnClickListener {
|
|
public final /* synthetic */ WidgetChannelsListAdapter $adapter;
|
|
public final /* synthetic */ ItemStageActiveEvent this$0;
|
|
|
|
public AnonymousClass1(ItemStageActiveEvent itemStageActiveEvent, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
this.this$0 = itemStageActiveEvent;
|
|
this.$adapter = widgetChannelsListAdapter;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
StageChannel data;
|
|
Channel channel;
|
|
if (this.this$0.getAdapterPosition() != -1) {
|
|
ChannelListItem item = this.$adapter.getItem(this.this$0.getAdapterPosition());
|
|
if (!(item instanceof ChannelListItemStageActiveEvent)) {
|
|
item = null;
|
|
}
|
|
ChannelListItemStageActiveEvent channelListItemStageActiveEvent = (ChannelListItemStageActiveEvent) item;
|
|
if (channelListItemStageActiveEvent != null && (data = channelListItemStageActiveEvent.getData()) != null && (channel = data.getChannel()) != null && AnimatableValueParser.w1(channel)) {
|
|
this.$adapter.getOnJoinStageChannel().invoke(channelListItemStageActiveEvent.getData().getChannel());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemStageActiveEvent(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362347;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362347);
|
|
if (imageView != null) {
|
|
i2 = 2131363856;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131363856);
|
|
if (imageView2 != null) {
|
|
i2 = 2131363857;
|
|
TextView textView = (TextView) view.findViewById(2131363857);
|
|
if (textView != null) {
|
|
i2 = 2131365123;
|
|
TextView textView2 = (TextView) view.findViewById(2131365123);
|
|
if (textView2 != null) {
|
|
i2 = 2131365124;
|
|
MaterialButton materialButton = (MaterialButton) view.findViewById(2131365124);
|
|
if (materialButton != null) {
|
|
i2 = 2131365125;
|
|
TextView textView3 = (TextView) view.findViewById(2131365125);
|
|
if (textView3 != null) {
|
|
i2 = 2131365126;
|
|
TextView textView4 = (TextView) view.findViewById(2131365126);
|
|
if (textView4 != null) {
|
|
i2 = 2131365618;
|
|
UserSummaryView userSummaryView = (UserSummaryView) view.findViewById(2131365618);
|
|
if (userSummaryView != null) {
|
|
i2 = 2131365619;
|
|
MaterialTextView materialTextView = (MaterialTextView) view.findViewById(2131365619);
|
|
if (materialTextView != null) {
|
|
WidgetChannelsListItemActiveStageEventBinding widgetChannelsListItemActiveStageEventBinding = new WidgetChannelsListItemActiveStageEventBinding((ConstraintLayout) view, imageView, imageView2, textView, textView2, materialButton, textView3, textView4, userSummaryView, materialTextView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemActiveStageEventBinding, "WidgetChannelsListItemAc…entBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemActiveStageEventBinding;
|
|
materialButton.setOnClickListener(new AnonymousClass1(this, widgetChannelsListAdapter));
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
int i2;
|
|
CharSequence charSequence;
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
StageChannel data = ((ChannelListItemStageActiveEvent) channelListItem).getData();
|
|
int audienceSize = data.getAudienceSize();
|
|
TextView textView = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView, "binding.stageEventTopic");
|
|
StageInstance stageInstance = data.getStageInstance();
|
|
textView.setText(stageInstance != null ? stageInstance.f() : null);
|
|
TextView textView2 = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView2, "binding.stageEventChannel");
|
|
Channel channel = data.getChannel();
|
|
ConstraintLayout constraintLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(constraintLayout, "binding.root");
|
|
Context context = constraintLayout.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.root.context");
|
|
textView2.setText(AnimatableValueParser.A0(channel, context, false, 2));
|
|
TextView textView3 = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView3, "binding.stageEventListeners");
|
|
b.m(textView3, 2131890960, new Object[]{Integer.valueOf(audienceSize)}, null, 4);
|
|
UserSummaryView userSummaryView = this.binding.f;
|
|
int i3 = 8;
|
|
userSummaryView.setVisibility(data.getSpeakers().isEmpty() ^ true ? 0 : 8);
|
|
if (!data.getSpeakers().isEmpty()) {
|
|
userSummaryView.setMembers(data.getSpeakers());
|
|
}
|
|
MaterialTextView materialTextView = this.binding.g;
|
|
if (!data.getSpeakers().isEmpty()) {
|
|
i3 = 0;
|
|
}
|
|
materialTextView.setVisibility(i3);
|
|
if (!data.getSpeakers().isEmpty()) {
|
|
if (data.getSpeakers().size() != 1) {
|
|
Context context2 = materialTextView.getContext();
|
|
m.checkNotNullExpressionValue(context2, "context");
|
|
charSequence = b.i(materialTextView, 2131894655, new Object[]{data.getSpeakers().get(0).getUser().getUsername(), StringResourceUtilsKt.getI18nPluralString(context2, 2131755358, data.getSpeakers().size() - 1, Integer.valueOf(data.getSpeakers().size() - 1))}, null, 4);
|
|
} else {
|
|
charSequence = data.getSpeakers().get(0).getUser().getUsername();
|
|
}
|
|
materialTextView.setText(charSequence);
|
|
}
|
|
MaterialButton materialButton = this.binding.f1713c;
|
|
if (!data.getContainsMe()) {
|
|
i2 = 2131893525;
|
|
} else {
|
|
StageRoles r12 = data.m43getMyRolestwRsX0();
|
|
i2 = (r12 == null || !StageRoles.m26isSpeakerimpl(r12.m28unboximpl())) ? 2131893526 : 2131893527;
|
|
}
|
|
materialButton.setText(i2);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemStageChannelAudienceCount extends Item {
|
|
private final WidgetChannelsListItemAudienceCountBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemStageChannelAudienceCount(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131365086;
|
|
ImageView imageView = (ImageView) view.findViewById(2131365086);
|
|
if (imageView != null) {
|
|
i2 = 2131365112;
|
|
TextView textView = (TextView) view.findViewById(2131365112);
|
|
if (textView != null) {
|
|
WidgetChannelsListItemAudienceCountBinding widgetChannelsListItemAudienceCountBinding = new WidgetChannelsListItemAudienceCountBinding((RelativeLayout) view, imageView, textView);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemAudienceCountBinding, "WidgetChannelsListItemAu…untBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemAudienceCountBinding;
|
|
return;
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemStageAudienceCount channelListItemStageAudienceCount = (ChannelListItemStageAudienceCount) channelListItem;
|
|
TextView textView = this.binding.b;
|
|
if (channelListItemStageAudienceCount.getAudienceSize() != 0) {
|
|
b.m(textView, 2131893510, new Object[]{Integer.valueOf(channelListItemStageAudienceCount.getAudienceSize())}, null, 4);
|
|
} else {
|
|
textView.setText(2131893531);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChannelsListAdapter.kt */
|
|
public static final class ItemVoiceUser extends Item {
|
|
private final WidgetChannelsListItemVoiceUserBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ItemVoiceUser(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
super(i, widgetChannelsListAdapter);
|
|
m.checkNotNullParameter(widgetChannelsListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i2 = 2131362410;
|
|
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(2131362410);
|
|
if (simpleDraweeView != null) {
|
|
i2 = 2131362411;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362411);
|
|
if (imageView != null) {
|
|
i2 = 2131362412;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131362412);
|
|
if (imageView2 != null) {
|
|
i2 = 2131362413;
|
|
TextView textView = (TextView) view.findViewById(2131362413);
|
|
if (textView != null) {
|
|
i2 = 2131362414;
|
|
ImageView imageView3 = (ImageView) view.findViewById(2131362414);
|
|
if (imageView3 != null) {
|
|
i2 = 2131362415;
|
|
TextView textView2 = (TextView) view.findViewById(2131362415);
|
|
if (textView2 != null) {
|
|
i2 = 2131363666;
|
|
LinearLayout linearLayout = (LinearLayout) view.findViewById(2131363666);
|
|
if (linearLayout != null) {
|
|
WidgetChannelsListItemVoiceUserBinding widgetChannelsListItemVoiceUserBinding = new WidgetChannelsListItemVoiceUserBinding((RelativeLayout) view, simpleDraweeView, imageView, imageView2, textView, imageView3, textView2, linearLayout);
|
|
m.checkNotNullExpressionValue(widgetChannelsListItemVoiceUserBinding, "WidgetChannelsListItemVo…serBinding.bind(itemView)");
|
|
this.binding = widgetChannelsListItemVoiceUserBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemVoiceUser itemVoiceUser) {
|
|
return (WidgetChannelsListAdapter) itemVoiceUser.adapter;
|
|
}
|
|
|
|
public void onConfigure(int i, ChannelListItem channelListItem) {
|
|
m.checkNotNullParameter(channelListItem, "data");
|
|
super.onConfigure(i, (int) channelListItem);
|
|
ChannelListItemVoiceUser channelListItemVoiceUser = (ChannelListItemVoiceUser) channelListItem;
|
|
Channel component1 = channelListItemVoiceUser.component1();
|
|
VoiceState component2 = channelListItemVoiceUser.component2();
|
|
User component3 = channelListItemVoiceUser.component3();
|
|
GuildMember component4 = channelListItemVoiceUser.component4();
|
|
boolean component5 = channelListItemVoiceUser.component5();
|
|
boolean component6 = channelListItemVoiceUser.component6();
|
|
SimpleDraweeView simpleDraweeView = this.binding.b;
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "binding.channelsItemVoiceUserAvatar");
|
|
IconUtils.setIcon$default(simpleDraweeView, component3, 2131165295, null, null, channelListItemVoiceUser.getComputed(), 24, null);
|
|
RelativeLayout relativeLayout = this.binding.a;
|
|
m.checkNotNullExpressionValue(relativeLayout, "binding.root");
|
|
ViewExtensions.setOnLongClickListenerConsumeClick(relativeLayout, new WidgetChannelsListAdapter$ItemVoiceUser$onConfigure$1(this, channelListItem));
|
|
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemVoiceUser$onConfigure$2(this, channelListItem));
|
|
TextView textView = this.binding.g;
|
|
m.checkNotNullExpressionValue(textView, "binding.channelsItemVoiceUserName");
|
|
textView.setText(GuildMember.Companion.getNickOrUsername$default(GuildMember.Companion, component3, component4, component1, null, 8, null));
|
|
ImageView imageView = this.binding.f1723c;
|
|
m.checkNotNullExpressionValue(imageView, "binding.channelsItemVoiceUserCamera");
|
|
int i2 = 8;
|
|
imageView.setVisibility(component2.j() ? 0 : 8);
|
|
ImageView imageView2 = this.binding.f;
|
|
m.checkNotNullExpressionValue(imageView2, "binding.channelsItemVoiceUserMicrophone");
|
|
imageView2.setVisibility(AnimatableValueParser.s1(component2) ? 0 : 8);
|
|
ImageView imageView3 = this.binding.d;
|
|
m.checkNotNullExpressionValue(imageView3, "binding.channelsItemVoiceUserHeadphones");
|
|
boolean z2 = true;
|
|
imageView3.setVisibility(component2.g() || component2.b() ? 0 : 8);
|
|
TextView textView2 = this.binding.e;
|
|
m.checkNotNullExpressionValue(textView2, "binding.channelsItemVoiceUserLive");
|
|
if (!component5 || !component6) {
|
|
z2 = false;
|
|
}
|
|
if (z2) {
|
|
i2 = 0;
|
|
}
|
|
textView2.setVisibility(i2);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChannelsListAdapter(RecyclerView recyclerView, FragmentManager fragmentManager) {
|
|
super(recyclerView, false, 2, null);
|
|
m.checkNotNullParameter(recyclerView, "recycler");
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
this.fragmentManager = fragmentManager;
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getBottomNavHeight$p(WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
return widgetChannelsListAdapter.bottomNavHeight;
|
|
}
|
|
|
|
public static final /* synthetic */ FragmentManager access$getFragmentManager$p(WidgetChannelsListAdapter widgetChannelsListAdapter) {
|
|
return widgetChannelsListAdapter.fragmentManager;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setBottomNavHeight$p(WidgetChannelsListAdapter widgetChannelsListAdapter, int i) {
|
|
widgetChannelsListAdapter.bottomNavHeight = i;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function1<Channel, Unit> getOnCallChannel() {
|
|
return this.onCallChannel;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super com.discord.api.channel.Channel, ? super java.lang.Boolean, kotlin.Unit>, kotlin.jvm.functions.Function2<com.discord.api.channel.Channel, java.lang.Boolean, kotlin.Unit> */
|
|
public final Function2<Channel, Boolean, Unit> getOnCollapseCategory() {
|
|
return this.onCollapseCategory;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function1<Channel, Unit> getOnJoinStageChannel() {
|
|
return this.onJoinStageChannel;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function1<Channel, Unit> getOnSelectChannel() {
|
|
return this.onSelectChannel;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function1<Channel, Unit> getOnSelectChannelOptions() {
|
|
return this.onSelectChannelOptions;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super android.view.View, kotlin.Unit>, kotlin.jvm.functions.Function1<android.view.View, kotlin.Unit> */
|
|
public final Function1<View, Unit> getOnSelectInvite() {
|
|
return this.onSelectInvite;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super com.discord.models.user.User, ? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function2<com.discord.models.user.User, com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function2<User, Channel, Unit> getOnSelectUserOptions() {
|
|
return this.onSelectUserOptions;
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */
|
|
public final Function1<Channel, Unit> getOnViewGuildScheduledEvents() {
|
|
return this.onViewGuildScheduledEvents;
|
|
}
|
|
|
|
public final long getSelectedGuildId() {
|
|
return this.selectedGuildId;
|
|
}
|
|
|
|
public final void handleBottomNavHeight(int i) {
|
|
this.bottomNavHeight = i;
|
|
notifyItemChanged(getInternalData().lastIndexOf(new ChannelListBottomNavSpaceItem(this.selectedGuildId)));
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public MGRecyclerViewHolder<?, ChannelListItem> onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
m.checkNotNullParameter(viewGroup, "parent");
|
|
switch (i) {
|
|
case 0:
|
|
return new ItemChannelText(2131558907, this);
|
|
case 1:
|
|
return new ItemChannelVoice(2131558910, this);
|
|
case 2:
|
|
return new ItemVoiceUser(2131558919, this);
|
|
case 3:
|
|
return new ItemChannelPrivate(2131558908, this);
|
|
case 4:
|
|
case 5:
|
|
case 10:
|
|
default:
|
|
throw invalidViewTypeException(i);
|
|
case 6:
|
|
return new ItemHeader(2131558913, this);
|
|
case 7:
|
|
return new ItemMFA(2131558915, this);
|
|
case 8:
|
|
return new ItemChannelCategory(2131558906, this);
|
|
case 9:
|
|
return new ItemInvite(2131558914, this);
|
|
case 11:
|
|
return new ItemSpace(2131558650, this);
|
|
case 12:
|
|
return new ItemChannelThread(2131558917, this);
|
|
case 13:
|
|
return new ItemChannelStageVoice(2131558909, this);
|
|
case 14:
|
|
return new MGRecyclerViewHolder<>(2131558916, this);
|
|
case 15:
|
|
return new ItemStageActiveEvent(2131558904, this);
|
|
case 16:
|
|
return new ItemStageChannelAudienceCount(2131558905, this);
|
|
case 17:
|
|
return new ItemChannelDirectory(2131558911, this);
|
|
case 18:
|
|
return new ItemChannelAddServer(2131558911, this);
|
|
case 19:
|
|
return new ItemGuildScheduledEvents(2131558912, this);
|
|
case 20:
|
|
return new ItemInvite(2131558911, this);
|
|
}
|
|
}
|
|
|
|
public final void setOnCallChannel(Function1<? super Channel, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onCallChannel = function1;
|
|
}
|
|
|
|
public final void setOnCollapseCategory(Function2<? super Channel, ? super Boolean, Unit> function2) {
|
|
m.checkNotNullParameter(function2, "<set-?>");
|
|
this.onCollapseCategory = function2;
|
|
}
|
|
|
|
public final void setOnJoinStageChannel(Function1<? super Channel, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onJoinStageChannel = function1;
|
|
}
|
|
|
|
public final void setOnSelectChannel(Function1<? super Channel, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onSelectChannel = function1;
|
|
}
|
|
|
|
public final void setOnSelectChannelOptions(Function1<? super Channel, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onSelectChannelOptions = function1;
|
|
}
|
|
|
|
public final void setOnSelectInvite(Function1<? super View, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onSelectInvite = function1;
|
|
}
|
|
|
|
public final void setOnSelectUserOptions(Function2<? super User, ? super Channel, Unit> function2) {
|
|
m.checkNotNullParameter(function2, "<set-?>");
|
|
this.onSelectUserOptions = function2;
|
|
}
|
|
|
|
public final void setOnViewGuildScheduledEvents(Function1<? super Channel, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.onViewGuildScheduledEvents = function1;
|
|
}
|
|
|
|
public final void setSelectedGuildId(long j) {
|
|
this.selectedGuildId = j;
|
|
}
|
|
}
|