445 lines
13 KiB
Smali
445 lines
13 KiB
Smali
.class public final Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "WidgetGuildSelector.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ItemGuild"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter;",
|
|
"Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final icon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final iconText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final iconWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final name$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final noGuildStringId:I
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const-class v0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;
|
|
|
|
const/4 v1, 0x4
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
const-string v2, "name"
|
|
|
|
const-string v3, "getName()Landroid/widget/TextView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const-string v2, "iconWrap"
|
|
|
|
const-string v3, "getIconWrap()Landroid/view/View;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "icon"
|
|
|
|
const-string v3, "getIcon()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x2
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "iconText"
|
|
|
|
const-string v3, "getIconText()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
sput-object v1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ILcom/discord/widgets/guilds/WidgetGuildSelector$Adapter;I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/LayoutRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->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
|
|
|
|
iput p3, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->noGuildStringId:I
|
|
|
|
const p1, 0x7f0a04ca
|
|
|
|
invoke-static {p0, p1}, Lk0/j/a;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->name$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a04f3
|
|
|
|
invoke-static {p0, p1}, Lk0/j/a;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->iconWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a04c8
|
|
|
|
invoke-static {p0, p1}, Lk0/j/a;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->icon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a04c9
|
|
|
|
invoke-static {p0, p1}, Lk0/j/a;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->iconText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
new-instance p1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild$1;
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild$1;-><init>(Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter;)V
|
|
|
|
const/4 p2, 0x0
|
|
|
|
new-array p2, p2, [Landroid/view/View;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->setOnClickListener(Lrx/functions/Action3;[Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getIcon()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->icon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->$$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, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getIconText()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->iconText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
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 getIconWrap()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->iconWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->$$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/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getName()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->name$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->$$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
|
|
|
|
|
|
# virtual methods
|
|
.method public final getNoGuildStringId()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->noGuildStringId:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onConfigure(ILcom/discord/widgets/guilds/WidgetGuildSelector$Item;)V
|
|
.locals 11
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->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/WidgetGuildSelector$Adapter$ItemGuild;->getName()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->getName()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
iget v1, p0, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->noGuildStringId:I
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result p1
|
|
|
|
if-lez p1, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
:goto_1
|
|
if-ne p1, v1, :cond_2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v2, "ICON_UNSET"
|
|
|
|
invoke-static {p1, v2}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/2addr p1, v1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->getIcon()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v5, "itemView"
|
|
|
|
invoke-static {p1, v5}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v5, 0x7f040133
|
|
|
|
invoke-static {p1, v5}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/view/View;I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v7
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->getIcon()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const v5, 0x7f0700d3
|
|
|
|
invoke-virtual {p1, v5}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float v5, p1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
const/16 v9, 0x8
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v2 .. v10}, Lcom/discord/utilities/extensions/SimpleDraweeViewExtensionsKt;->configureAsGuildIcon$default(Lcom/facebook/drawee/view/SimpleDraweeView;ZLcom/discord/models/domain/ModelGuild;FLjava/lang/Integer;Ljava/lang/Integer;ZILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->getIconWrap()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->setClipToOutline(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->getIconText()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-virtual {p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->getShortName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
move-object v1, p2
|
|
|
|
:cond_4
|
|
:goto_2
|
|
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/guilds/WidgetGuildSelector$Item;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/guilds/WidgetGuildSelector$Adapter$ItemGuild;->onConfigure(ILcom/discord/widgets/guilds/WidgetGuildSelector$Item;)V
|
|
|
|
return-void
|
|
.end method
|