418 lines
13 KiB
Smali
418 lines
13 KiB
Smali
.class public final Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;
|
|
.super Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$Item;
|
|
.source "WidgetChannelsListAdapter.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ItemChannelVoice"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public final itemName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final speakerIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final userCount$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 7
|
|
|
|
const-class v0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;
|
|
|
|
const/4 v1, 0x3
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v2, Lx/u/b/u;
|
|
|
|
invoke-static {v0}, Lx/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lx/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "itemName"
|
|
|
|
const-string v5, "getItemName()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lx/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lx/u/b/w;->a:Lx/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lx/u/b/x;->property1(Lx/u/b/t;)Lx/y/d;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-instance v3, Lx/u/b/u;
|
|
|
|
invoke-static {v0}, Lx/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lx/y/b;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "userCount"
|
|
|
|
const-string v6, "getUserCount()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v3, v4, v5, v6}, Lx/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v4, Lx/u/b/w;->a:Lx/u/b/x;
|
|
|
|
invoke-virtual {v4, v3}, Lx/u/b/x;->property1(Lx/u/b/t;)Lx/y/d;
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
const/4 v2, 0x2
|
|
|
|
new-instance v3, Lx/u/b/u;
|
|
|
|
invoke-static {v0}, Lx/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lx/y/b;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v4, "speakerIcon"
|
|
|
|
const-string v5, "getSpeakerIcon()Landroid/widget/ImageView;"
|
|
|
|
invoke-direct {v3, v0, v4, v5}, Lx/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lx/u/b/w;->a:Lx/u/b/x;
|
|
|
|
invoke-virtual {v0, v3}, Lx/u/b/x;->property1(Lx/u/b/t;)Lx/y/d;
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
sput-object v1, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->Companion:Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ILcom/discord/widgets/channels/list/WidgetChannelsListAdapter;)V
|
|
.locals 0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$Item;-><init>(ILcom/discord/widgets/channels/list/WidgetChannelsListAdapter;)V
|
|
|
|
const p1, 0x7f0a01bb
|
|
|
|
invoke-static {p0, p1}, Le/o/a/j/a;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->itemName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a01bd
|
|
|
|
invoke-static {p0, p1}, Le/o/a/j/a;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->userCount$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a01bc
|
|
|
|
invoke-static {p0, p1}, Le/o/a/j/a;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->speakerIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "adapter"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final getItemName()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->itemName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getSpeakerIcon()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->speakerIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getUserCount()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->userCount$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onConfigure(ILcom/discord/widgets/channels/list/items/ChannelListItem;)V
|
|
.locals 7
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"SetTextI18n"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
check-cast p2, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;->component1()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;->component2()Z
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;->component3()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;->component4()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/channels/list/items/ChannelListItemVoiceChannel;->component5()Z
|
|
|
|
move-result p2
|
|
|
|
const/high16 v3, 0x100000
|
|
|
|
invoke-static {v3, v1}, Lcom/discord/utilities/permissions/PermissionUtils;->can(ILjava/lang/Integer;)Z
|
|
|
|
move-result v1
|
|
|
|
sget-object v3, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->Companion:Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;
|
|
|
|
iget-object v4, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v5, "itemView"
|
|
|
|
invoke-static {v4, v5}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v6, "itemView.context"
|
|
|
|
invoke-static {v4, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v3, v0, v4}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;->access$getVoiceChannelColor(Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice$Companion;ZLandroid/content/Context;)I
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-static {v4, v5}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4, v0}, Landroid/view/View;->setSelected(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getItemName()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getItemName()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const p2, 0x7f08027f
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz p2, :cond_1
|
|
|
|
const p2, 0x7f08028b
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const p2, 0x7f080288
|
|
|
|
:goto_0
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getSpeakerIcon()Landroid/widget/ImageView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getSpeakerIcon()Landroid/widget/ImageView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {v3}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getUserCount()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getUserLimit()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/16 v3, 0x8
|
|
|
|
:goto_2
|
|
invoke-virtual {p2, v3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->getUserCount()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x2f
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getUserLimit()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/channels/list/items/ChannelListItem;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/channels/list/WidgetChannelsListAdapter$ItemChannelVoice;->onConfigure(ILcom/discord/widgets/channels/list/items/ChannelListItem;)V
|
|
|
|
return-void
|
|
.end method
|