306 lines
9.7 KiB
Smali
306 lines
9.7 KiB
Smali
.class public final Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "GuildTemplateChannelsView.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ChannelViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelsAdapter;",
|
|
"Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final channelImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final channelName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const-class v0, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
const-string v2, "channelImage"
|
|
|
|
const-string v3, "getChannelImage()Landroid/widget/ImageView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Ly/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const-string v2, "channelName"
|
|
|
|
const-string v3, "getChannelName()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Ly/n/c/s;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
sput-object v1, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ILcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelsAdapter;)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/LayoutRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {p2, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
const p1, 0x7f0a0500
|
|
|
|
invoke-static {p0, p1}, Ly/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->channelImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a0501
|
|
|
|
invoke-static {p0, p1}, Ly/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->channelName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getChannelImage()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->channelImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->$$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/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getChannelName()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->channelName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->$$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/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;)V
|
|
.locals 3
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->getChannelName()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isCategory()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->getChannelImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0802a4
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isVoiceChannel()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->getChannelImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f080296
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->getChannelImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f08028d
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
:goto_0
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getParentId()J
|
|
|
|
move-result-wide p1
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-lez v2, :cond_3
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->getChannelImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
check-cast p1, Landroid/view/ViewGroup$MarginLayoutParams;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
const/high16 v0, 0x41c00000 # 24.0f
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->adapter:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
check-cast v1, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelsAdapter;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "adapter.context.resources"
|
|
|
|
invoke-static {v1, v2}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p2, v0, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F
|
|
|
|
move-result p2
|
|
|
|
float-to-int p2, p2
|
|
|
|
iput p2, p1, Landroid/view/ViewGroup$MarginLayoutParams;->leftMargin:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string p2, "null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelViewHolder;->onConfigure(ILcom/discord/widgets/guilds/create/GuildTemplateChannelsView$ChannelDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|