373 lines
11 KiB
Smali
373 lines
11 KiB
Smali
.class public final Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;
|
|
.super Lcom/discord/utilities/views/SimpleRecyclerAdapter$ViewHolder;
|
|
.source "WidgetSettingsDeveloper.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/settings/WidgetSettingsDeveloper;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ExperimentViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/views/SimpleRecyclerAdapter$ViewHolder<",
|
|
"Ljava/util/Map$Entry<",
|
|
"+",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final spinner$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const-class v0, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v2, Lj0/n/c/q;
|
|
|
|
invoke-static {v0}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "nameTv"
|
|
|
|
const-string v5, "getNameTv()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
new-instance v2, Lj0/n/c/q;
|
|
|
|
invoke-static {v0}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v3, "spinner"
|
|
|
|
const-string v4, "getSpinner()Landroid/widget/Spinner;"
|
|
|
|
invoke-direct {v2, v0, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
aput-object v2, v1, v0
|
|
|
|
sput-object v1, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/view/View;)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/views/SimpleRecyclerAdapter$ViewHolder;-><init>(Landroid/view/View;)V
|
|
|
|
const p1, 0x7f0a02c3
|
|
|
|
invoke-static {p0, p1}, Lf/n/a/k/a;->k(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02c2
|
|
|
|
invoke-static {p0, p1}, Lf/n/a/k/a;->k(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->spinner$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
new-instance p1, Landroid/widget/ArrayAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/Spinner;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0d013a
|
|
|
|
invoke-static {}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper;->access$getBUCKET_LIST$cp()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {p1, v0, v1, v2}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/Spinner;->setAdapter(Landroid/widget/SpinnerAdapter;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "itemView"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSpinner$p(Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;)Landroid/widget/Spinner;
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getNameTv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->$$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 getSpinner()Landroid/widget/Spinner;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->spinner$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->$$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/Spinner;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic bind(Ljava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p1, Ljava/util/Map$Entry;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->bind(Ljava/util/Map$Entry;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bind(Ljava/util/Map$Entry;)V
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map$Entry<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getNameTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getNameTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreExperiments$Experiment;->getRawExperiment()Lcom/discord/models/domain/ModelExperiment;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelExperiment;->getType()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, v0
|
|
|
|
:goto_0
|
|
if-nez v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v2}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v4
|
|
|
|
const v5, 0x36ebcb
|
|
|
|
if-eq v4, v5, :cond_3
|
|
|
|
const v5, 0x5e23bf3
|
|
|
|
if-eq v4, v5, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const-string v4, "guild"
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const v2, 0x7f08027f
|
|
|
|
const v4, 0x7f08027f
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const-string v4, "user"
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const v2, 0x7f0803ab
|
|
|
|
const v4, 0x7f0803ab
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_1
|
|
const v2, 0x7f080328
|
|
|
|
const v4, 0x7f080328
|
|
|
|
:goto_2
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v8, 0xe
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v3 .. v9}, Lcom/discord/utilities/drawable/DrawableCompat;->setCompoundDrawablesCompat$default(Landroid/widget/TextView;IIIIILjava/lang/Object;)V
|
|
|
|
sget-object v2, Lcom/discord/widgets/settings/WidgetSettingsDeveloper;->Companion:Lcom/discord/widgets/settings/WidgetSettingsDeveloper$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreExperiments$Experiment;->getBucket()I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v2, v3}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$Companion;->access$getBucketSelectionPosition(Lcom/discord/widgets/settings/WidgetSettingsDeveloper$Companion;I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v0}, Landroid/widget/Spinner;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/Spinner;->setSelection(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;->getSpinner()Landroid/widget/Spinner;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v3, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder$bind$1;
|
|
|
|
invoke-direct {v3, p0, v2, v1, p1}, Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder$bind$1;-><init>(Lcom/discord/widgets/settings/WidgetSettingsDeveloper$ExperimentViewHolder;ILjava/lang/String;Lcom/discord/stores/StoreExperiments$Experiment;)V
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/Spinner;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|