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