264 lines
7 KiB
Smali
264 lines
7 KiB
Smali
.class public final Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;
|
|
.super Landroid/widget/ArrayAdapter;
|
|
.source "ViewInviteSettingsSheet.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ChannelsSpinnerAdapter"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroid/widget/ArrayAdapter<",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;I[Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;I[Ljava/lang/Object;)V
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "channels"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;I[Lcom/discord/models/domain/ModelChannel;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
new-array p3, p3, [Lcom/discord/models/domain/ModelChannel;
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;-><init>(Landroid/content/Context;I[Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getItemView(IILandroid/view/View;Z)Landroid/view/View;
|
|
.locals 1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p3, p2, v0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
move-result-object p3
|
|
|
|
:goto_0
|
|
const-string p2, "view"
|
|
|
|
invoke-static {p3, p2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p3, p1, p4}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->setupViews(Landroid/view/View;IZ)V
|
|
|
|
return-object p3
|
|
.end method
|
|
|
|
.method private final setupViews(Landroid/view/View;IZ)V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter$setupViews$1;
|
|
|
|
invoke-direct {v0, p3}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter$setupViews$1;-><init>(Z)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter$setupViews$1;->invoke()I
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p1, p3}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
const-string p3, "label"
|
|
|
|
invoke-static {p1, p3}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p3, 0x1
|
|
|
|
new-array p3, p3, [Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
aget-object p2, v0, p2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
aput-object p2, p3, v0
|
|
|
|
array-length p2, p3
|
|
|
|
invoke-static {p3, p2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "#%s"
|
|
|
|
invoke-static {p3, p2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "java.lang.String.format(format, *args)"
|
|
|
|
invoke-static {p2, p3}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getCount()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
array-length v0, v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getDropDownView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
|
|
.locals 1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const p3, 0x7f0d00e4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-direct {p0, p1, p3, p2, v0}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->getItemView(IILandroid/view/View;Z)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "parent"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public getItem(I)Lcom/discord/models/domain/ModelChannel;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
aget-object p1, v0, p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public bridge synthetic getItem(I)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->getItem(I)Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
|
|
.locals 1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const p3, 0x7f0d00e3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p3, p2, v0}, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->getItemView(IILandroid/view/View;Z)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "parent"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final setData([Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/invite/ViewInviteSettingsSheet$ChannelsSpinnerAdapter;->channels:[Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->notifyDataSetChanged()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "newData"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|