package com.discord.widgets.channels.list; import android.annotation.SuppressLint; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; 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 b.a.k.b; import b.c.a.a0.d; import b.d.b.a.a; import com.discord.R; import com.discord.api.channel.Channel; import com.discord.api.channel.ChannelUtils; import com.discord.api.guild.GuildMaxVideoChannelUsers; import com.discord.api.guildjoinrequest.ApplicationStatus; import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.permission.Permission; import com.discord.api.stageinstance.StageInstance; import com.discord.api.voice.state.VoiceState; import com.discord.databinding.WidgetChannelsListItemActiveEventBinding; 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.WidgetChannelsListItemGuildJoinRequestBinding; import com.discord.databinding.WidgetChannelsListItemGuildRoleSubsBinding; 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.guild.Guild; 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.images.MGImages; 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.ChannelListItemActiveEvent; import com.discord.widgets.channels.list.items.ChannelListItemActiveEventData; 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.ChannelListItemGuildJoinRequest; 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.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.guildscheduledevent.GuildScheduledEventLocationInfo; import com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventDetailsBottomSheet; 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.Function0; 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 { private int bottomNavHeight; private final FragmentManager fragmentManager; private Function0 onAddServer = WidgetChannelsListAdapter$onAddServer$1.INSTANCE; private Function1 onCallChannel = WidgetChannelsListAdapter$onCallChannel$1.INSTANCE; private Function2 onCollapseCategory = WidgetChannelsListAdapter$onCollapseCategory$1.INSTANCE; private Function1 onSelectChannel = WidgetChannelsListAdapter$onSelectChannel$1.INSTANCE; private Function1 onSelectChannelOptions = WidgetChannelsListAdapter$onSelectChannelOptions$1.INSTANCE; private Function1 onSelectGuildRoleSubscriptionLockedChannel = WidgetChannelsListAdapter$onSelectGuildRoleSubscriptionLockedChannel$1.INSTANCE; private Function1 onSelectInvite = WidgetChannelsListAdapter$onSelectInvite$1.INSTANCE; private Function2 onSelectUserOptions = WidgetChannelsListAdapter$onSelectUserOptions$1.INSTANCE; private Function0 onViewGuildRoleSubscriptions = WidgetChannelsListAdapter$onViewGuildRoleSubscriptions$1.INSTANCE; private Function1 onViewGuildScheduledEvents = WidgetChannelsListAdapter$onViewGuildScheduledEvents$1.INSTANCE; private long selectedGuildId; /* compiled from: WidgetChannelsListAdapter.kt */ public static abstract class Item extends MGRecyclerViewHolder { /* 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 || ChannelUtils.t(channel)) { Context context = view.getContext(); m.checkNotNullExpressionValue(context, "context"); i = DrawableCompat.getThemedDrawableRes$default(context, (int) R.attr.drawable_overlay_channels, 0, 2, (Object) null); } else { Context context2 = view.getContext(); m.checkNotNullExpressionValue(context2, "context"); i = DrawableCompat.getThemedDrawableRes$default(context2, (int) R.attr.drawable_overlay_channels_selected, 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 static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemChannelAddServer itemChannelAddServer) { return (WidgetChannelsListAdapter) itemChannelAddServer.adapter; } public void onConfigure(int i, ChannelListItem channelListItem) { m.checkNotNullParameter(channelListItem, "data"); super.onConfigure(i, (int) channelListItem); if (channelListItem instanceof ChannelListItemAddServer) { this.binding.c.setText(R.string.hub_sidebar_add_servers); this.binding.f2275b.setImageResource(R.drawable.ic_add_24dp); this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelAddServer$onConfigure$$inlined$apply$lambda$1(this)); } } } /* 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 R.drawable.ic_chevron_right_grey_12dp; } if (!channelListItemCategory.isCollapsed()) { return R.drawable.ic_chevron_down_grey_12dp; } return 0; } @ColorInt private final int getChannelColor(ChannelListItemCategory channelListItemCategory, Context context) { return channelListItemCategory.isMuted() ? ColorCompat.getThemedColor(context, (int) R.attr.colorInteractiveMuted) : ColorCompat.getThemedColor(context, (int) R.attr.colorChannelDefault); } } 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 = R.id.channels_item_category_add; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_category_add); if (imageView != null) { i2 = R.id.channels_item_category_arrow; ImageView imageView2 = (ImageView) view.findViewById(R.id.channels_item_category_arrow); if (imageView2 != null) { i2 = R.id.channels_item_category_name; TextView textView = (TextView) view.findViewById(R.id.channels_item_category_name); 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: b.a.k.b.j(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(ChannelUtils.c(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] = ChannelUtils.c(channelListItemCategory.getChannel()); TextView textView4 = this.binding.d; m.checkNotNullExpressionValue(textView4, "binding.channelsItemCategoryName"); objArr[1] = b.j(textView4, channelListItemCategory.isCollapsed() ? R.string.collapsed : R.string.expanded, new Object[0], null, 4); textView2.setContentDescription(b.j(textView3, R.string.category_a11y_label_with_expanded_state, 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.c.setImageResource(Companion.access$getArrowDrawable(companion, channelListItemCategory)); ImageView imageView = this.binding.c; m.checkNotNullExpressionValue(imageView, "binding.channelsItemCategoryArrow"); imageView.setImageTintList(ColorStateList.valueOf(access$getChannelColor)); if (this.isCollapsed != channelListItemCategory.isCollapsed()) { this.isCollapsed = channelListItemCategory.isCollapsed(); this.binding.c.startAnimation(channelListItemCategory.isCollapsed() ? ARROW_ANIM_COLLAPSE : ARROW_ANIM_EXPAND); } ImageView imageView2 = this.binding.f2270b; m.checkNotNullExpressionValue(imageView2, "binding.channelsItemCategoryAdd"); if (!channelListItemCategory.getCanManageChannels()) { i2 = 8; } imageView2.setVisibility(i2); ImageView imageView3 = this.binding.f2270b; m.checkNotNullExpressionValue(imageView3, "binding.channelsItemCategoryAdd"); imageView3.setImageTintList(ColorStateList.valueOf(access$getChannelColor)); this.binding.f2270b.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; boolean u = ChannelUtils.u(channelListItemDirectory.getChannel()); if (u) { TextView textView = this.binding.c; m.checkNotNullExpressionValue(textView, "binding.directoryChannelName"); String m = channelListItemDirectory.getChannel().m(); if (m == null) { m = ""; } textView.setText(m); } else { this.binding.c.setText(R.string.hub_sidebar_join_servers); } this.binding.f2275b.setImageResource(u ? R.drawable.ic_hub_24dp : R.drawable.ic_compass); TextView textView2 = this.binding.d; m.checkNotNullExpressionValue(textView2, "binding.directoryChannelUnreadCount"); b.a(textView2, channelListItemDirectory.getUnreadCount() > 0 ? String.valueOf(channelListItemDirectory.getUnreadCount()) : null); 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 = R.id.channel_list_item_private_status; StatusView statusView = (StatusView) view.findViewById(R.id.channel_list_item_private_status); if (statusView != null) { i2 = R.id.channels_list_item_private_avatar; SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.channels_list_item_private_avatar); if (simpleDraweeView != null) { i2 = R.id.channels_list_item_private_desc; SimpleDraweeSpanTextView simpleDraweeSpanTextView = (SimpleDraweeSpanTextView) view.findViewById(R.id.channels_list_item_private_desc); if (simpleDraweeSpanTextView != null) { i2 = R.id.channels_list_item_private_mentions; TextView textView = (TextView) view.findViewById(R.id.channels_list_item_private_mentions); if (textView != null) { i2 = R.id.channels_list_item_private_name; TextView textView2 = (TextView) view.findViewById(R.id.channels_list_item_private_name); if (textView2 != null) { i2 = R.id.channels_list_item_private_tag; TextView textView3 = (TextView) view.findViewById(R.id.channels_list_item_private_tag); 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 (ChannelUtils.p(channelListItemPrivate.getChannel()) && channelListItemPrivate.getMentionCount() > 0) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return b.j(view, R.string.group_message_a11y_label_with_unreads, new Object[]{charSequence}, null, 4); } else if (ChannelUtils.p(channelListItemPrivate.getChannel())) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return b.j(view2, R.string.group_message_a11y_label, new Object[]{charSequence}, null, 4); } else if (channelListItemPrivate.getMentionCount() > 0) { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return b.j(view3, R.string.direct_message_a11y_label_with_unreads, new Object[]{charSequence}, null, 4); } else { View view4 = this.itemView; m.checkNotNullExpressionValue(view4, "itemView"); return b.j(view4, R.string.direct_message_a11y_label, 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 w = channel.w(); int size = w != null ? w.size() : 0; CharSequence h = b.h(context, R.string.members, new Object[0], null, 4); StringBuilder sb = new StringBuilder(); sb.append(size + 1); sb.append(' '); sb.append(h); return sb.toString(); } private final int getPresenceBg(boolean z2) { if (z2) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return ColorCompat.getThemedColor(view, (int) R.attr.color_bg_private_channel_presence_selected); } View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return ColorCompat.getThemedColor(view2, (int) R.attr.colorBackgroundSecondary); } @ColorInt private final int getTextColor(ChannelListItemPrivate channelListItemPrivate) { if (channelListItemPrivate.getSelected()) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return ColorCompat.getThemedColor(view, (int) R.attr.colorInteractiveActive); } else if (channelListItemPrivate.getMuted()) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return ColorCompat.getThemedColor(view2, (int) R.attr.colorInteractiveMuted); } else { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return ColorCompat.getThemedColor(view3, (int) R.attr.colorChannelDefault); } } /* JADX WARNING: Removed duplicated region for block: B:22:0x015f */ /* JADX WARNING: Removed duplicated region for block: B:23:0x0161 */ /* JADX WARNING: Removed duplicated region for block: B:25:0x0164 */ /* JADX WARNING: Removed duplicated region for block: B:26:0x0166 */ 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 (ChannelUtils.m(component1)) { str = ChannelUtils.c(component1); } else { TextView textView = this.binding.f; m.checkNotNullExpressionValue(textView, "binding.channelsListItemPrivateName"); Context context = textView.getContext(); m.checkNotNullExpressionValue(context, "binding.channelsListItemPrivateName.context"); str = ChannelUtils.e(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(ChannelUtils.A(component1) ? 0 : 8); SimpleDraweeView simpleDraweeView = this.binding.c; m.checkNotNullExpressionValue(simpleDraweeView, "it"); IconUtils.setIcon$default(simpleDraweeView, component1, (int) R.dimen.avatar_size_standard, (MGImages.ChangeDetector) null, 8, (Object) null); StatusView statusView = this.binding.f2272b; m.checkNotNullExpressionValue(statusView, "binding.channelListItemPrivateStatus"); statusView.setVisibility(ChannelUtils.n(component1, component2) ? 0 : 8); this.binding.f2272b.setPresence(component2); this.binding.f2272b.setBackgroundColor(getPresenceBg(component3)); if (ChannelUtils.A(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.j(simpleDraweeSpanTextView2, R.string.system_dm_activity_text, new Object[0], null, 4)); } else if (ChannelUtils.w(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, (int) R.attr.colorInteractiveActive) : ColorCompat.getThemedColor(context, (int) R.attr.colorChannelDefault); } } /* 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 = R.id.channels_item_stage_voice_channel_guild_role_subscription_icon; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_stage_voice_channel_guild_role_subscription_icon); if (imageView != null) { i2 = R.id.stage_channel_item_stage_channel_icon; ImageView imageView2 = (ImageView) view.findViewById(R.id.stage_channel_item_stage_channel_icon); if (imageView2 != null) { i2 = R.id.stage_channel_item_voice_channel_name; TextView textView = (TextView) view.findViewById(R.id.stage_channel_item_voice_channel_name); if (textView != null) { i2 = R.id.stage_channel_item_voice_channel_topic; TextView textView2 = (TextView) view.findViewById(R.id.stage_channel_item_voice_channel_topic); if (textView2 != null) { WidgetChannelsListItemChannelStageVoiceBinding widgetChannelsListItemChannelStageVoiceBinding = new WidgetChannelsListItemChannelStageVoiceBinding((RelativeLayout) view, imageView, imageView2, 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.j(relativeLayout, R.string.guild_sidebar_voice_channel_a11y_label_with_limit, new Object[]{ChannelUtils.c(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.j(relativeLayout2, R.string.guild_sidebar_voice_channel_a11y_label_with_users, new Object[]{ChannelUtils.c(channelListVocalItem.getChannel()), StringResourceUtilsKt.getI18nPluralString(context, R.plurals.guild_sidebar_voice_channel_a11y_label_with_users_userCount, channelListVocalItem.getNumUsersConnected(), Integer.valueOf(channelListVocalItem.getNumUsersConnected()))}, null, 4); } else { RelativeLayout relativeLayout4 = this.binding.a; m.checkNotNullExpressionValue(relativeLayout4, "binding.root"); return b.j(relativeLayout4, R.string.guild_sidebar_voice_channel_a11y_label, new Object[]{ChannelUtils.c(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 component8 = channelListItemStageVoiceChannel.component8(); boolean component9 = channelListItemStageVoiceChannel.component9(); int i2 = 0; boolean z2 = component6 != null; boolean can = PermissionUtils.can(Permission.CONNECT, 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, component8, 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.d; textView.setText(ChannelUtils.c(component1)); textView.setTextColor(access$getVoiceChannelColor); TextView textView2 = this.binding.e; m.checkNotNullExpressionValue(textView2, "binding.stageChannelItemVoiceChannelTopic"); ViewExtensions.setTextAndVisibilityBy(textView2, component6 != null ? component6.f() : null); ImageView imageView = this.binding.f2273b; m.checkNotNullExpressionValue(imageView, "binding.channelsItemStag…GuildRoleSubscriptionIcon"); if (!component9) { i2 = 8; } imageView.setVisibility(i2); if (component8) { this.binding.f2273b.setImageResource(R.drawable.ic_premium_channel_locked); } else if (component9) { this.binding.f2273b.setImageResource(R.drawable.ic_premium_channel_unlocked); } int i3 = !can ? R.drawable.ic_channel_lock_16dp : component4 ? R.drawable.ic_channel_stage_locked : R.drawable.ic_channel_stage_24dp; ImageView imageView2 = this.binding.c; imageView2.setImageResource(i3); if (!z2 || !can) { colorStateList = ColorStateList.valueOf(access$getVoiceChannelColor); } else { RelativeLayout relativeLayout3 = this.binding.a; m.checkNotNullExpressionValue(relativeLayout3, "binding.root"); colorStateList = ColorStateList.valueOf(ColorCompat.getColor(relativeLayout3.getContext(), (int) R.color.status_green_600)); } imageView2.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$4(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 = R.id.channels_item_channel_guild_role_subscription_icon; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_channel_guild_role_subscription_icon); if (imageView != null) { i2 = R.id.channels_item_channel_hash; ImageView imageView2 = (ImageView) view.findViewById(R.id.channels_item_channel_hash); if (imageView2 != null) { i2 = R.id.channels_item_channel_mentions; TextView textView = (TextView) view.findViewById(R.id.channels_item_channel_mentions); if (textView != null) { i2 = R.id.channels_item_channel_name; TextView textView2 = (TextView) view.findViewById(R.id.channels_item_channel_name); if (textView2 != null) { i2 = R.id.channels_item_channel_unread; ImageView imageView3 = (ImageView) view.findViewById(R.id.channels_item_channel_unread); if (imageView3 != null) { WidgetChannelsListItemChannelBinding widgetChannelsListItemChannelBinding = new WidgetChannelsListItemChannelBinding((RelativeLayout) view, imageView, imageView2, textView, textView2, imageView3); 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() ? R.drawable.ic_channel_announcements_thread_nsfw : R.drawable.ic_channel_announcements_nsfw : channelListItemTextChannel.isLocked() ? channelListItemTextChannel.getHasActiveThreads() ? R.drawable.ic_channel_announcements_thread_locked : R.drawable.ic_channel_announcements_locked : channelListItemTextChannel.getHasActiveThreads() ? R.drawable.ic_channel_announcements_thread : R.drawable.ic_channel_announcements; } private final CharSequence getContentDescription(ChannelListItemTextChannel channelListItemTextChannel, boolean z2) { if (z2 && channelListItemTextChannel.getMentionCount() > 0) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return b.j(view, R.string.guild_sidebar_announcement_channel_a11y_label_with_mentions, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), R.plurals.guild_sidebar_announcement_channel_a11y_label_with_mentions_mentionCount, channelListItemTextChannel.getMentionCount(), Integer.valueOf(channelListItemTextChannel.getMentionCount())), ChannelUtils.c(channelListItemTextChannel.getChannel())}, null, 4); } else if (z2 && channelListItemTextChannel.isUnread()) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return b.j(view2, R.string.guild_sidebar_announcement_channel_a11y_label_with_unreads, new Object[]{ChannelUtils.c(channelListItemTextChannel.getChannel())}, null, 4); } else if (z2) { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return b.j(view3, R.string.guild_sidebar_announcement_channel_a11y_label, new Object[]{ChannelUtils.c(channelListItemTextChannel.getChannel())}, null, 4); } else if (channelListItemTextChannel.getMentionCount() > 0) { View view4 = this.itemView; m.checkNotNullExpressionValue(view4, "itemView"); return b.j(view4, R.string.guild_sidebar_default_channel_a11y_label_with_mentions, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), R.plurals.guild_sidebar_default_channel_a11y_label_with_mentions_mentionCount, channelListItemTextChannel.getMentionCount(), Integer.valueOf(channelListItemTextChannel.getMentionCount())), ChannelUtils.c(channelListItemTextChannel.getChannel())}, null, 4); } else if (channelListItemTextChannel.isUnread()) { View view5 = this.itemView; m.checkNotNullExpressionValue(view5, "itemView"); return b.j(view5, R.string.guild_sidebar_default_channel_a11y_label_with_unreads, new Object[]{ChannelUtils.c(channelListItemTextChannel.getChannel())}, null, 4); } else { View view6 = this.itemView; m.checkNotNullExpressionValue(view6, "itemView"); return b.j(view6, R.string.guild_sidebar_default_channel_a11y_label, new Object[]{ChannelUtils.c(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, (int) R.attr.colorInteractiveMuted); } else if (channelListItemTextChannel.isUnread()) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return ColorCompat.getThemedColor(view2, (int) R.attr.colorInteractiveActive); } else { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return ColorCompat.getThemedColor(view3, (int) R.attr.colorChannelDefault); } } @DrawableRes private final int getHashIcon(ChannelListItemTextChannel channelListItemTextChannel) { return channelListItemTextChannel.getChannel().o() ? channelListItemTextChannel.getHasActiveThreads() ? R.drawable.ic_thread_nsfw : R.drawable.ic_channel_text_nsfw : channelListItemTextChannel.isLocked() ? channelListItemTextChannel.getHasActiveThreads() ? R.drawable.ic_thread_locked : R.drawable.ic_channel_text_locked : channelListItemTextChannel.getHasActiveThreads() ? R.drawable.ic_thread : R.drawable.ic_channel_text; } @ColorInt private final int getTextColor(ChannelListItemTextChannel channelListItemTextChannel, boolean z2) { if (z2) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return ColorCompat.getThemedColor(view, (int) R.attr.colorInteractiveActive); } else if (channelListItemTextChannel.getMuted()) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return ColorCompat.getThemedColor(view2, (int) R.attr.colorInteractiveMuted); } else if (channelListItemTextChannel.isUnread()) { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return ColorCompat.getThemedColor(view3, (int) R.attr.colorInteractiveActive); } else { View view4 = this.itemView; m.checkNotNullExpressionValue(view4, "itemView"); return ColorCompat.getThemedColor(view4, (int) R.attr.colorChannelDefault); } } 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, channelListItemTextChannel, 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.e; m.checkNotNullExpressionValue(textView, "binding.channelsItemChannelName"); textView.setText(ChannelUtils.c(channelListItemTextChannel.getChannel())); this.binding.e.setTextColor(getTextColor(channelListItemTextChannel, channelListItemTextChannel.getSelected())); this.binding.c.setImageResource(z3 ? getAnnouncementsIcon(channelListItemTextChannel) : getHashIcon(channelListItemTextChannel)); ImageView imageView = this.binding.c; m.checkNotNullExpressionValue(imageView, "binding.channelsItemChannelHash"); imageView.setImageTintList(ColorStateList.valueOf(getHashColor(channelListItemTextChannel))); TextView textView2 = this.binding.d; m.checkNotNullExpressionValue(textView2, "binding.channelsItemChannelMentions"); textView2.setVisibility(channelListItemTextChannel.getMentionCount() > 0 ? 0 : 8); TextView textView3 = this.binding.d; m.checkNotNullExpressionValue(textView3, "binding.channelsItemChannelMentions"); textView3.setText(String.valueOf(Math.min(99, channelListItemTextChannel.getMentionCount()))); ImageView imageView2 = this.binding.f; m.checkNotNullExpressionValue(imageView2, "binding.channelsItemChannelUnread"); if (!channelListItemTextChannel.isUnread() || channelListItemTextChannel.getSelected() || channelListItemTextChannel.getMuted()) { z2 = false; } imageView2.setVisibility(z2 ? 0 : 8); TextView textView4 = this.binding.e; 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()) ? R.attr.font_primary_semibold : R.attr.font_primary_normal)); ImageView imageView3 = this.binding.f2271b; m.checkNotNullExpressionValue(imageView3, "binding.channelsItemChan…GuildRoleSubscriptionIcon"); if (!channelListItemTextChannel.isGuildRoleSubscriptionChannel()) { i2 = 8; } imageView3.setVisibility(i2); if (channelListItemTextChannel.isGuildRoleSubscriptionLockedChannel()) { this.binding.f2271b.setImageResource(R.drawable.ic_premium_channel_locked); } else if (channelListItemTextChannel.isGuildRoleSubscriptionChannel()) { this.binding.f2271b.setImageResource(R.drawable.ic_premium_channel_unlocked); } } } /* 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 = R.id.channels_item_thread_content; ConstraintLayout constraintLayout = (ConstraintLayout) view.findViewById(R.id.channels_item_thread_content); if (constraintLayout != null) { i2 = R.id.channels_item_thread_mentions; TextView textView = (TextView) view.findViewById(R.id.channels_item_thread_mentions); if (textView != null) { i2 = R.id.channels_item_thread_name; TextView textView2 = (TextView) view.findViewById(R.id.channels_item_thread_name); if (textView2 != null) { i2 = R.id.channels_item_thread_spine; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_thread_spine); if (imageView != null) { i2 = R.id.channels_item_thread_unread; ImageView imageView2 = (ImageView) view.findViewById(R.id.channels_item_thread_unread); 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.j(view, R.string.guild_sidebar_default_channel_a11y_label_with_mentions, new Object[]{StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), R.plurals.guild_sidebar_default_channel_a11y_label_with_mentions_mentionCount, 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.j(view2, R.string.guild_sidebar_default_channel_a11y_label_with_unreads, new Object[]{channelListItemThread.getChannel().m()}, null, 4); } else { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return b.j(view3, R.string.guild_sidebar_default_channel_a11y_label, new Object[]{channelListItemThread.getChannel().m()}, null, 4); } } private final int getSpineResourceId(WidgetChannelListModel.ThreadSpineType threadSpineType) { return m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.Single.INSTANCE) ? R.drawable.ic_spine_short_cap : m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.Start.INSTANCE) ? R.drawable.ic_spine_long_cap : m.areEqual(threadSpineType, WidgetChannelListModel.ThreadSpineType.End.INSTANCE) ? R.drawable.ic_spine_short_no_cap : R.drawable.ic_spine_long_no_cap; } @ColorInt private final int getTextColor(ChannelListItemThread channelListItemThread, boolean z2) { if (z2) { View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); return ColorCompat.getThemedColor(view, (int) R.attr.colorInteractiveActive); } else if (channelListItemThread.getMuted()) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); return ColorCompat.getThemedColor(view2, (int) R.attr.colorInteractiveMuted); } else if (channelListItemThread.isUnread()) { View view3 = this.itemView; m.checkNotNullExpressionValue(view3, "itemView"); return ColorCompat.getThemedColor(view3, (int) R.attr.colorInteractiveActive); } else { View view4 = this.itemView; m.checkNotNullExpressionValue(view4, "itemView"); return ColorCompat.getThemedColor(view4, (int) R.attr.colorChannelDefault); } } 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.f2282b; m.checkNotNullExpressionValue(constraintLayout2, "binding.channelsItemThreadContent"); setBackground(constraintLayout2, channelListItemThread.getSelected(), channelListItemThread.getChannel()); ConstraintLayout constraintLayout3 = this.binding.f2282b; 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.c; m.checkNotNullExpressionValue(textView2, "binding.channelsItemThreadMentions"); boolean z2 = true; int i2 = 0; textView2.setVisibility(channelListItemThread.getMentionCount() > 0 ? 0 : 8); TextView textView3 = this.binding.c; 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() || channelListItemThread.getMuted()) { 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()) ? R.attr.font_primary_semibold : R.attr.font_primary_normal)); 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, (int) R.attr.colorInteractiveActive) : ColorCompat.getThemedColor(context, (int) R.attr.colorChannelDefault); } } /* 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 = R.id.channels_item_channel_mentions; TextView textView = (TextView) view.findViewById(R.id.channels_item_channel_mentions); if (textView != null) { i2 = R.id.channels_item_channel_unread; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_channel_unread); if (imageView != null) { i2 = R.id.channels_item_voice_channel_event_topic; TextView textView2 = (TextView) view.findViewById(R.id.channels_item_voice_channel_event_topic); if (textView2 != null) { i2 = R.id.channels_item_voice_channel_guild_role_subscription_icon; ImageView imageView2 = (ImageView) view.findViewById(R.id.channels_item_voice_channel_guild_role_subscription_icon); if (imageView2 != null) { i2 = R.id.channels_item_voice_channel_name; TextView textView3 = (TextView) view.findViewById(R.id.channels_item_voice_channel_name); if (textView3 != null) { i2 = R.id.channels_item_voice_channel_speaker; ImageView imageView3 = (ImageView) view.findViewById(R.id.channels_item_voice_channel_speaker); if (imageView3 != null) { i2 = R.id.channels_item_voice_channel_user_limit; VoiceUserLimitView voiceUserLimitView = (VoiceUserLimitView) view.findViewById(R.id.channels_item_voice_channel_user_limit); if (voiceUserLimitView != null) { i2 = R.id.channels_item_voice_channel_wrapper; LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.channels_item_voice_channel_wrapper); if (linearLayout != null) { WidgetChannelsListItemChannelVoiceBinding widgetChannelsListItemChannelVoiceBinding = new WidgetChannelsListItemChannelVoiceBinding((ConstraintLayout) view, textView, imageView, textView2, imageView2, textView3, imageView3, voiceUserLimitView, linearLayout); 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) { ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); return b.j(constraintLayout, R.string.guild_sidebar_voice_channel_a11y_label_with_limit, new Object[]{ChannelUtils.c(channelListItemVoiceChannel.getChannel()), Integer.valueOf(channelListItemVoiceChannel.getNumUsersConnected()), Integer.valueOf(i)}, null, 4); } else if (channelListItemVoiceChannel.getNumUsersConnected() > 0) { ConstraintLayout constraintLayout2 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout2, "binding.root"); ConstraintLayout constraintLayout3 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout3, "binding.root"); Context context = constraintLayout3.getContext(); m.checkNotNullExpressionValue(context, "binding.root.context"); return b.j(constraintLayout2, R.string.guild_sidebar_voice_channel_a11y_label_with_users, new Object[]{ChannelUtils.c(channelListItemVoiceChannel.getChannel()), StringResourceUtilsKt.getI18nPluralString(context, R.plurals.guild_sidebar_voice_channel_a11y_label_with_users_userCount, channelListItemVoiceChannel.getNumUsersConnected(), Integer.valueOf(channelListItemVoiceChannel.getNumUsersConnected()))}, null, 4); } else { ConstraintLayout constraintLayout4 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout4, "binding.root"); return b.j(constraintLayout4, R.string.guild_sidebar_voice_channel_a11y_label, new Object[]{ChannelUtils.c(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(); boolean component3 = channelListItemVoiceChannel.component3(); Long component4 = channelListItemVoiceChannel.component4(); int component5 = channelListItemVoiceChannel.component5(); boolean component6 = channelListItemVoiceChannel.component6(); int component7 = channelListItemVoiceChannel.component7(); boolean component8 = channelListItemVoiceChannel.component8(); boolean component9 = channelListItemVoiceChannel.component9(); boolean component10 = channelListItemVoiceChannel.component10(); GuildMaxVideoChannelUsers component11 = channelListItemVoiceChannel.component11(); boolean component12 = channelListItemVoiceChannel.component12(); boolean component13 = channelListItemVoiceChannel.component13(); GuildScheduledEvent component14 = channelListItemVoiceChannel.component14(); boolean can = PermissionUtils.can(Permission.CONNECT, component4); 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, component3, context); this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$1(this, component12, channelListItem)); ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); constraintLayout.setSelected(component3); ConstraintLayout constraintLayout2 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout2, "binding.root"); setBackground(constraintLayout2, component3, component1); TextView textView = this.binding.f; m.checkNotNullExpressionValue(textView, "binding.channelsItemVoiceChannelName"); textView.setText(ChannelUtils.c(component1)); this.binding.f.setTextColor(access$getVoiceChannelColor); TextView textView2 = this.binding.d; m.checkNotNullExpressionValue(textView2, "binding.channelsItemVoiceChannelEventTopic"); ViewExtensions.setTextAndVisibilityBy(textView2, component14 != null ? component14.j() : null); TextView textView3 = this.binding.f2274b; m.checkNotNullExpressionValue(textView3, "binding.channelsItemChannelMentions"); textView3.setVisibility(component5 > 0 ? 0 : 8); TextView textView4 = this.binding.f2274b; m.checkNotNullExpressionValue(textView4, "binding.channelsItemChannelMentions"); textView4.setText(String.valueOf(Math.min(99, component5))); ImageView imageView = this.binding.c; m.checkNotNullExpressionValue(imageView, "binding.channelsItemChannelUnread"); boolean z2 = true; imageView.setVisibility(component6 && !component2 ? 0 : 8); ImageView imageView2 = this.binding.e; m.checkNotNullExpressionValue(imageView2, "binding.channelsItemVoic…GuildRoleSubscriptionIcon"); imageView2.setVisibility(component13 ? 0 : 8); if (component12) { this.binding.e.setImageResource(R.drawable.ic_premium_channel_locked); } else if (component13) { this.binding.e.setImageResource(R.drawable.ic_premium_channel_unlocked); } int i2 = !can ? R.drawable.ic_channel_lock_16dp : component9 ? R.drawable.ic_voice_nsfw : component8 ? R.drawable.ic_channel_voice_locked : R.drawable.ic_channel_voice; if (component14 != null) { View view2 = this.itemView; m.checkNotNullExpressionValue(view2, "itemView"); access$getVoiceChannelColor = ColorCompat.getColor(view2.getContext(), (int) R.color.status_green_600); } this.binding.g.setImageResource(i2); ImageView imageView3 = this.binding.g; m.checkNotNullExpressionValue(imageView3, "binding.channelsItemVoiceChannelSpeaker"); imageView3.setImageTintList(ColorStateList.valueOf(access$getVoiceChannelColor)); GuildMaxVideoChannelUsers.Limited limited = (GuildMaxVideoChannelUsers.Limited) (!(component11 instanceof GuildMaxVideoChannelUsers.Limited) ? null : component11); int a = limited != null ? limited.a() : 0; int min = Math.min(component1.B(), a); if (min > 0) { boolean z3 = component10 && min == a; if (!z3) { a = component1.B(); } VoiceUserLimitView voiceUserLimitView = this.binding.h; m.checkNotNullExpressionValue(voiceUserLimitView, "binding.channelsItemVoiceChannelUserLimit"); if (a <= 0 || !can) { z2 = false; } voiceUserLimitView.setVisibility(z2 ? 0 : 8); this.binding.h.a(component7, a, z3); ConstraintLayout constraintLayout3 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout3, "binding.root"); constraintLayout3.setContentDescription(getContentDescription(channelListItemVoiceChannel, a)); } else { VoiceUserLimitView voiceUserLimitView2 = this.binding.h; m.checkNotNullExpressionValue(voiceUserLimitView2, "binding.channelsItemVoiceChannelUserLimit"); voiceUserLimitView2.setVisibility(8); ConstraintLayout constraintLayout4 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout4, "binding.root"); constraintLayout4.setContentDescription(getContentDescription(channelListItemVoiceChannel, min)); } if (PermissionUtils.can(16, component4)) { ConstraintLayout constraintLayout5 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout5, "binding.root"); ViewExtensions.setOnLongClickListenerConsumeClick(constraintLayout5, new WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$2(this, component1)); return; } ConstraintLayout constraintLayout6 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout6, "binding.root"); ViewExtensions.setOnLongClickListenerConsumeClick(constraintLayout6, WidgetChannelsListAdapter$ItemChannelVoice$onConfigure$3.INSTANCE); } } /* compiled from: WidgetChannelsListAdapter.kt */ public static final class ItemGuildJoinRequest extends Item { private final WidgetChannelsListItemGuildJoinRequestBinding binding; public final /* synthetic */ class WhenMappings { public static final /* synthetic */ int[] $EnumSwitchMapping$0; static { ApplicationStatus.values(); int[] iArr = new int[5]; $EnumSwitchMapping$0 = iArr; iArr[ApplicationStatus.STARTED.ordinal()] = 1; iArr[ApplicationStatus.PENDING.ordinal()] = 2; iArr[ApplicationStatus.REJECTED.ordinal()] = 3; } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public ItemGuildJoinRequest(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) { super(i, widgetChannelsListAdapter); m.checkNotNullParameter(widgetChannelsListAdapter, "adapter"); View view = this.itemView; ConstraintLayout constraintLayout = (ConstraintLayout) view; int i2 = R.id.channels_list_item_guild_join_request_button; MaterialButton materialButton = (MaterialButton) view.findViewById(R.id.channels_list_item_guild_join_request_button); if (materialButton != null) { i2 = R.id.channels_list_item_guild_join_request_label; TextView textView = (TextView) view.findViewById(R.id.channels_list_item_guild_join_request_label); if (textView != null) { WidgetChannelsListItemGuildJoinRequestBinding widgetChannelsListItemGuildJoinRequestBinding = new WidgetChannelsListItemGuildJoinRequestBinding((ConstraintLayout) view, constraintLayout, materialButton, textView); m.checkNotNullExpressionValue(widgetChannelsListItemGuildJoinRequestBinding, "WidgetChannelsListItemGu…estBinding.bind(itemView)"); this.binding = widgetChannelsListItemGuildJoinRequestBinding; return; } } throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2))); } public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemGuildJoinRequest itemGuildJoinRequest) { return (WidgetChannelsListAdapter) itemGuildJoinRequest.adapter; } public void onConfigure(int i, ChannelListItem channelListItem) { m.checkNotNullParameter(channelListItem, "data"); super.onConfigure(i, (int) channelListItem); if (channelListItem instanceof ChannelListItemGuildJoinRequest) { ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); Context context = constraintLayout.getContext(); ChannelListItemGuildJoinRequest channelListItemGuildJoinRequest = (ChannelListItemGuildJoinRequest) channelListItem; ApplicationStatus a = channelListItemGuildJoinRequest.getGuildJoinRequest().a(); GuildMember member = channelListItemGuildJoinRequest.getMember(); this.binding.c.setOnClickListener(new WidgetChannelsListAdapter$ItemGuildJoinRequest$onConfigure$1(this, context)); if (!member.getPending()) { ConstraintLayout constraintLayout2 = this.binding.f2276b; m.checkNotNullExpressionValue(constraintLayout2, "binding.channelsListItemGuildJoinRequest"); constraintLayout2.setVisibility(8); } int ordinal = a.ordinal(); if (ordinal == 0) { this.binding.d.setText(R.string.member_verification_notice_text); this.binding.c.setText(R.string.member_verification_notice_cta); this.binding.c.setBackgroundColor(ColorCompat.getThemedColor(context, (int) R.attr.color_brand)); ConstraintLayout constraintLayout3 = this.binding.f2276b; m.checkNotNullExpressionValue(constraintLayout3, "binding.channelsListItemGuildJoinRequest"); constraintLayout3.setVisibility(0); } else if (ordinal == 1) { this.binding.d.setText(R.string.member_verification_pending_application_notice_title); this.binding.c.setText(R.string.member_verification_pending_application_modal_cancel); this.binding.c.setBackgroundColor(ColorCompat.getThemedColor(context, (int) R.attr.colorBackgroundAccent)); ConstraintLayout constraintLayout4 = this.binding.f2276b; m.checkNotNullExpressionValue(constraintLayout4, "binding.channelsListItemGuildJoinRequest"); constraintLayout4.setVisibility(0); } else if (ordinal != 2) { ConstraintLayout constraintLayout5 = this.binding.f2276b; m.checkNotNullExpressionValue(constraintLayout5, "binding.channelsListItemGuildJoinRequest"); constraintLayout5.setVisibility(8); } else { this.binding.d.setText(R.string.member_verification_application_rejected_notice_title); this.binding.c.setText(R.string.member_verification_learn_more); this.binding.c.setBackgroundColor(ColorCompat.getThemedColor(context, (int) R.attr.colorBackgroundAccent)); ConstraintLayout constraintLayout6 = this.binding.f2276b; m.checkNotNullExpressionValue(constraintLayout6, "binding.channelsListItemGuildJoinRequest"); constraintLayout6.setVisibility(0); } } } } /* compiled from: WidgetChannelsListAdapter.kt */ public static final class ItemGuildRoleSubscriptionsOverview extends Item { private final WidgetChannelsListItemGuildRoleSubsBinding binding; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public ItemGuildRoleSubscriptionsOverview(int i, WidgetChannelsListAdapter widgetChannelsListAdapter) { super(i, widgetChannelsListAdapter); m.checkNotNullParameter(widgetChannelsListAdapter, "adapter"); View view = this.itemView; int i2 = R.id.directory_channel_icon; ImageView imageView = (ImageView) view.findViewById(R.id.directory_channel_icon); if (imageView != null) { i2 = R.id.directory_channel_name; TextView textView = (TextView) view.findViewById(R.id.directory_channel_name); if (textView != null) { WidgetChannelsListItemGuildRoleSubsBinding widgetChannelsListItemGuildRoleSubsBinding = new WidgetChannelsListItemGuildRoleSubsBinding((LinearLayout) view, imageView, textView); m.checkNotNullExpressionValue(widgetChannelsListItemGuildRoleSubsBinding, "WidgetChannelsListItemGu…ubsBinding.bind(itemView)"); this.binding = widgetChannelsListItemGuildRoleSubsBinding; return; } } throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2))); } public static final /* synthetic */ WidgetChannelsListAdapter access$getAdapter$p(ItemGuildRoleSubscriptionsOverview itemGuildRoleSubscriptionsOverview) { return (WidgetChannelsListAdapter) itemGuildRoleSubscriptionsOverview.adapter; } public void onConfigure(int i, ChannelListItem channelListItem) { m.checkNotNullParameter(channelListItem, "data"); super.onConfigure(i, (int) channelListItem); LinearLayout linearLayout = this.binding.a; m.checkNotNullExpressionValue(linearLayout, "binding.root"); Context context = linearLayout.getContext(); m.checkNotNullExpressionValue(context, "context"); int themedDrawableRes$default = DrawableCompat.getThemedDrawableRes$default(context, (int) R.attr.drawable_overlay_channels, 0, 2, (Object) null); LinearLayout linearLayout2 = this.binding.a; m.checkNotNullExpressionValue(linearLayout2, "binding.root"); ViewExtensions.setBackgroundAndKeepPadding(linearLayout2, ContextCompat.getDrawable(context, themedDrawableRes$default)); this.binding.f2277b.setText(R.string.guild_role_subscriptions_channel_label); this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemGuildRoleSubscriptionsOverview$onConfigure$1(this)); } } /* 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 = R.id.channels_list_item_guild_scheduled_event_count; TextView textView = (TextView) view.findViewById(R.id.channels_list_item_guild_scheduled_event_count); if (textView != null) { i2 = R.id.channels_list_item_guild_scheduled_event_icon; ImageView imageView = (ImageView) view.findViewById(R.id.channels_list_item_guild_scheduled_event_icon); if (imageView != null) { i2 = R.id.channels_list_item_guild_scheduled_event_label; TextView textView2 = (TextView) view.findViewById(R.id.channels_list_item_guild_scheduled_event_label); 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; View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); Context context = view.getContext(); TextView textView = this.binding.f2278b; m.checkNotNullExpressionValue(textView, "binding.channelsListItemGuildScheduledEventCount"); textView.setVisibility(channelListItemGuildScheduledEvents.getData().isEmpty() ^ true ? 0 : 8); TextView textView2 = this.binding.f2278b; m.checkNotNullExpressionValue(textView2, "binding.channelsListItemGuildScheduledEventCount"); textView2.setText(String.valueOf(channelListItemGuildScheduledEvents.getData().size())); ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); m.checkNotNullExpressionValue(context, "context"); ViewExtensions.setBackgroundAndKeepPadding(constraintLayout, ContextCompat.getDrawable(context, DrawableCompat.getThemedDrawableRes$default(context, (int) R.attr.drawable_overlay_channels, 0, 2, (Object) null))); 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 = R.id.channels_list_item_header; TextView textView = (TextView) view.findViewById(R.id.channels_list_item_header); if (textView != null) { i2 = R.id.channels_list_new; ImageView imageView = (ImageView) view.findViewById(R.id.channels_list_new); 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.c; m.checkNotNullExpressionValue(imageView, "binding.channelsListNew"); imageView.setVisibility(4); this.binding.c.setOnClickListener(null); } else if (component2 == R.string.others_online) { ImageView imageView2 = this.binding.c; m.checkNotNullExpressionValue(imageView2, "binding.channelsListNew"); imageView2.setVisibility(4); this.binding.c.setOnClickListener(null); } else if (component2 == R.string.text_channels) { ImageView imageView3 = this.binding.c; m.checkNotNullExpressionValue(imageView3, "binding.channelsListNew"); imageView3.setVisibility(0); this.binding.c.setOnClickListener(new WidgetChannelsListAdapter$ItemHeader$onConfigure$1(component4)); } else if (component2 == R.string.voice_channels) { ImageView imageView4 = this.binding.c; m.checkNotNullExpressionValue(imageView4, "binding.channelsListNew"); imageView4.setVisibility(0); this.binding.c.setOnClickListener(new WidgetChannelsListAdapter$ItemHeader$onConfigure$2(component4)); } this.binding.f2279b.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.c.setText(R.string.invite_a_friend); a.f2275b.setImageResource(R.drawable.ic_guild_invite_24dp); } } } } /* compiled from: WidgetChannelsListAdapter.kt */ public static final class ItemMFA extends MGRecyclerViewHolder { 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(R.id.channels_list_item_mfa_text); 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(R.id.channels_list_item_mfa_text))); } public void onConfigure(int i, ChannelListItem channelListItem) { m.checkNotNullParameter(channelListItem, "data"); super.onConfigure(i, (int) channelListItem); LinkifiedTextView linkifiedTextView = this.binding.f2280b; m.checkNotNullExpressionValue(linkifiedTextView, "binding.channelsListItemMfaText"); b.m(linkifiedTextView, R.string.two_fa_guild_mfa_warning, new Object[0], WidgetChannelsListAdapter$ItemMFA$onConfigure$1.INSTANCE); } } /* compiled from: WidgetChannelsListAdapter.kt */ public static final class ItemSpace extends MGRecyclerViewHolder { /* 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 WidgetChannelsListItemActiveEventBinding 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) { GuildScheduledEventLocationInfo.ChannelLocation channelLocation; Channel channel; if (this.this$0.getAdapterPosition() != -1) { ChannelListItem item = this.$adapter.getItem(this.this$0.getAdapterPosition()); if (!(item instanceof ChannelListItemActiveEvent)) { item = null; } ChannelListItemActiveEvent channelListItemActiveEvent = (ChannelListItemActiveEvent) item; if (channelListItemActiveEvent != null) { GuildScheduledEventLocationInfo locationInfo = channelListItemActiveEvent.getData().getLocationInfo(); if ((locationInfo instanceof GuildScheduledEventLocationInfo.ChannelLocation) && (channel = (channelLocation = (GuildScheduledEventLocationInfo.ChannelLocation) locationInfo).getChannel()) != null && ChannelUtils.t(channel)) { this.$adapter.getOnCallChannel().invoke(channelLocation.getChannel()); } else if ((locationInfo instanceof GuildScheduledEventLocationInfo.ExternalLocation) && channelListItemActiveEvent.getData().getEventId() != null) { WidgetGuildScheduledEventDetailsBottomSheet.Companion.showForGuild(WidgetChannelsListAdapter.access$getFragmentManager$p(this.$adapter), channelListItemActiveEvent.getData().getEventId().longValue()); } } } } } /* 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 = R.id.channel_separator; ImageView imageView = (ImageView) view.findViewById(R.id.channel_separator); if (imageView != null) { i2 = R.id.event_channel; TextView textView = (TextView) view.findViewById(R.id.event_channel); if (textView != null) { i2 = R.id.event_connect_button; MaterialButton materialButton = (MaterialButton) view.findViewById(R.id.event_connect_button); if (materialButton != null) { i2 = R.id.event_topic; TextView textView2 = (TextView) view.findViewById(R.id.event_topic); if (textView2 != null) { i2 = R.id.live_now_dot; ImageView imageView2 = (ImageView) view.findViewById(R.id.live_now_dot); if (imageView2 != null) { i2 = R.id.live_now_label; TextView textView3 = (TextView) view.findViewById(R.id.live_now_label); if (textView3 != null) { i2 = R.id.stage_event_listeners; TextView textView4 = (TextView) view.findViewById(R.id.stage_event_listeners); if (textView4 != null) { i2 = R.id.user_summary; UserSummaryView userSummaryView = (UserSummaryView) view.findViewById(R.id.user_summary); if (userSummaryView != null) { i2 = R.id.user_summary_label; MaterialTextView materialTextView = (MaterialTextView) view.findViewById(R.id.user_summary_label); if (materialTextView != null) { WidgetChannelsListItemActiveEventBinding widgetChannelsListItemActiveEventBinding = new WidgetChannelsListItemActiveEventBinding((ConstraintLayout) view, imageView, textView, materialButton, textView2, imageView2, textView3, textView4, userSummaryView, materialTextView); m.checkNotNullExpressionValue(widgetChannelsListItemActiveEventBinding, "WidgetChannelsListItemAc…entBinding.bind(itemView)"); this.binding = widgetChannelsListItemActiveEventBinding; materialButton.setOnClickListener(new AnonymousClass1(this, widgetChannelsListAdapter)); return; } } } } } } } } } throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i2))); } /* JADX WARNING: Code restructure failed: missing block: B:28:0x00a1, code lost: if (r14 != null) goto L_0x00ac; */ public void onConfigure(int i, ChannelListItem channelListItem) { String str; CharSequence charSequence; m.checkNotNullParameter(channelListItem, "data"); super.onConfigure(i, (int) channelListItem); ChannelListItemActiveEventData data = ((ChannelListItemActiveEvent) channelListItem).getData(); GuildScheduledEventLocationInfo locationInfo = data.getLocationInfo(); if (!(locationInfo instanceof GuildScheduledEventLocationInfo.ChannelLocation)) { locationInfo = null; } GuildScheduledEventLocationInfo.ChannelLocation channelLocation = (GuildScheduledEventLocationInfo.ChannelLocation) locationInfo; Channel channel = channelLocation != null ? channelLocation.getChannel() : null; int audienceSize = data.getAudienceSize(); boolean z2 = channel != null && channel.A() == 13; int i2 = z2 ? R.drawable.ic_channel_stage_16dp : (channel == null || channel.A() != 2) ? R.drawable.ic_location_16dp : R.drawable.ic_channel_voice_16dp; ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); Drawable drawable = ContextCompat.getDrawable(constraintLayout.getContext(), i2); this.binding.f.setText(data.getLocationInfo() instanceof GuildScheduledEventLocationInfo.ExternalLocation ? R.string.live_event : R.string.stage_channel_live_now); TextView textView = this.binding.e; m.checkNotNullExpressionValue(textView, "binding.eventTopic"); textView.setText(data.getTopic()); TextView textView2 = this.binding.c; m.checkNotNullExpressionValue(textView2, "binding.eventChannel"); if (channel != null) { ConstraintLayout constraintLayout2 = this.binding.a; m.checkNotNullExpressionValue(constraintLayout2, "binding.root"); Context context = constraintLayout2.getContext(); m.checkNotNullExpressionValue(context, "binding.root.context"); str = ChannelUtils.e(channel, context, false, 2); } str = data.getLocationInfo().getLocationName(); textView2.setText(str); this.binding.c.setCompoundDrawablesWithIntrinsicBounds(drawable, (Drawable) null, (Drawable) null, (Drawable) null); TextView textView3 = this.binding.g; m.checkNotNullExpressionValue(textView3, "binding.stageEventListeners"); int i3 = 8; textView3.setVisibility(z2 ? 0 : 8); TextView textView4 = this.binding.g; m.checkNotNullExpressionValue(textView4, "binding.stageEventListeners"); b.n(textView4, R.string.listening_count, new Object[]{Integer.valueOf(audienceSize)}, null, 4); ImageView imageView = this.binding.f2268b; m.checkNotNullExpressionValue(imageView, "binding.channelSeparator"); imageView.setVisibility(z2 ? 0 : 8); UserSummaryView userSummaryView = this.binding.h; userSummaryView.setVisibility(data.getSpeakers().isEmpty() ^ true ? 0 : 8); if (!data.getSpeakers().isEmpty()) { userSummaryView.setMembers(data.getSpeakers()); } MaterialTextView materialTextView = this.binding.i; 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.j(materialTextView, R.string.user_summary_with_others, new Object[]{data.getSpeakers().get(0).getUser().getUsername(), StringResourceUtilsKt.getI18nPluralString(context2, R.plurals.user_summary_with_others_count, data.getSpeakers().size() - 1, Integer.valueOf(data.getSpeakers().size() - 1))}, null, 4); } else { charSequence = data.getSpeakers().get(0).getUser().getUsername(); } materialTextView.setText(charSequence); } this.binding.d.setText(data.getLocationInfo() instanceof GuildScheduledEventLocationInfo.ExternalLocation ? R.string.see_detail : !z2 ? R.string.join : R.string.stage_channel_join_button); } } /* 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 = R.id.stage_channel_audience_icon; ImageView imageView = (ImageView) view.findViewById(R.id.stage_channel_audience_icon); if (imageView != null) { i2 = R.id.stage_channels_audience_count; TextView textView = (TextView) view.findViewById(R.id.stage_channels_audience_count); 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.f2269b; if (channelListItemStageAudienceCount.getAudienceSize() != 0) { b.n(textView, R.string.stage_channel_audience_count, new Object[]{Integer.valueOf(channelListItemStageAudienceCount.getAudienceSize())}, null, 4); } else { textView.setText(R.string.stage_channel_no_audience); } } } /* 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 = R.id.channels_item_voice_user_avatar; SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.channels_item_voice_user_avatar); if (simpleDraweeView != null) { i2 = R.id.channels_item_voice_user_camera; ImageView imageView = (ImageView) view.findViewById(R.id.channels_item_voice_user_camera); if (imageView != null) { i2 = R.id.channels_item_voice_user_headphones; ImageView imageView2 = (ImageView) view.findViewById(R.id.channels_item_voice_user_headphones); if (imageView2 != null) { i2 = R.id.channels_item_voice_user_live; TextView textView = (TextView) view.findViewById(R.id.channels_item_voice_user_live); if (textView != null) { i2 = R.id.channels_item_voice_user_microphone; ImageView imageView3 = (ImageView) view.findViewById(R.id.channels_item_voice_user_microphone); if (imageView3 != null) { i2 = R.id.channels_item_voice_user_name; TextView textView2 = (TextView) view.findViewById(R.id.channels_item_voice_user_name); if (textView2 != null) { i2 = R.id.indicators_container; LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.indicators_container); 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.f2283b; m.checkNotNullExpressionValue(simpleDraweeView, "binding.channelsItemVoiceUserAvatar"); IconUtils.setIcon$default(simpleDraweeView, component3, R.dimen.avatar_size_small, 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.c; 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(d.V0(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; } public final Function0 getOnAddServer() { return this.onAddServer; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnCallChannel() { return this.onCallChannel; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function2 */ public final Function2 getOnCollapseCategory() { return this.onCollapseCategory; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnSelectChannel() { return this.onSelectChannel; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnSelectChannelOptions() { return this.onSelectChannelOptions; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnSelectGuildRoleSubscriptionLockedChannel() { return this.onSelectGuildRoleSubscriptionLockedChannel; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnSelectInvite() { return this.onSelectInvite; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function2 */ public final Function2 getOnSelectUserOptions() { return this.onSelectUserOptions; } public final Function0 getOnViewGuildRoleSubscriptions() { return this.onViewGuildRoleSubscriptions; } /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 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 onCreateViewHolder(ViewGroup viewGroup, int i) { MGRecyclerViewHolder mGRecyclerViewHolder; m.checkNotNullParameter(viewGroup, "parent"); switch (i) { case 0: return new ItemChannelText(R.layout.widget_channels_list_item_channel, this); case 1: return new ItemChannelVoice(R.layout.widget_channels_list_item_channel_voice, this); case 2: return new ItemVoiceUser(R.layout.widget_channels_list_item_voice_user, this); case 3: return new ItemChannelPrivate(R.layout.widget_channels_list_item_channel_private, this); case 4: case 5: case 10: default: throw invalidViewTypeException(i); case 6: return new ItemHeader(R.layout.widget_channels_list_item_header, this); case 7: return new ItemMFA(R.layout.widget_channels_list_item_mfa, this); case 8: return new ItemChannelCategory(R.layout.widget_channels_list_item_category, this); case 9: return new ItemInvite(R.layout.widget_channels_list_item_invite, this); case 11: return new ItemSpace(R.layout.recycler_item_bottom_nav_space, this); case 12: return new ItemChannelThread(R.layout.widget_channels_list_item_thread, this); case 13: return new ItemChannelStageVoice(R.layout.widget_channels_list_item_channel_stage_voice, this); case 14: return new MGRecyclerViewHolder<>((int) R.layout.widget_channels_list_item_stage_events_separator, this); case 15: return new ItemStageActiveEvent(R.layout.widget_channels_list_item_active_event, this); case 16: return new ItemStageChannelAudienceCount(R.layout.widget_channels_list_item_audience_count, this); case 17: mGRecyclerViewHolder = new ItemChannelDirectory(R.layout.widget_channels_list_item_directory, this); break; case 18: mGRecyclerViewHolder = new ItemChannelAddServer(R.layout.widget_channels_list_item_directory, this); break; case 19: return new ItemGuildScheduledEvents(R.layout.widget_channels_list_item_guild_scheduled_events, this); case 20: mGRecyclerViewHolder = new ItemInvite(R.layout.widget_channels_list_item_directory, this); break; case 21: return new ItemGuildRoleSubscriptionsOverview(R.layout.widget_channels_list_item_guild_role_subs, this); case 22: return new ItemGuildJoinRequest(R.layout.widget_channels_list_item_guild_join_request, this); } return mGRecyclerViewHolder; } public final void setOnAddServer(Function0 function0) { m.checkNotNullParameter(function0, ""); this.onAddServer = function0; } public final void setOnCallChannel(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onCallChannel = function1; } public final void setOnCollapseCategory(Function2 function2) { m.checkNotNullParameter(function2, ""); this.onCollapseCategory = function2; } public final void setOnSelectChannel(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onSelectChannel = function1; } public final void setOnSelectChannelOptions(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onSelectChannelOptions = function1; } public final void setOnSelectGuildRoleSubscriptionLockedChannel(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onSelectGuildRoleSubscriptionLockedChannel = function1; } public final void setOnSelectInvite(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onSelectInvite = function1; } public final void setOnSelectUserOptions(Function2 function2) { m.checkNotNullParameter(function2, ""); this.onSelectUserOptions = function2; } public final void setOnViewGuildRoleSubscriptions(Function0 function0) { m.checkNotNullParameter(function0, ""); this.onViewGuildRoleSubscriptions = function0; } public final void setOnViewGuildScheduledEvents(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onViewGuildScheduledEvents = function1; } public final void setSelectedGuildId(long j) { this.selectedGuildId = j; } }