247 lines
8.2 KiB
Smali
247 lines
8.2 KiB
Smali
.class public final Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;
|
|
.super Lcom/discord/app/AppDialog;
|
|
.source "WidgetSettingsLanguageSelect.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;,
|
|
Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Model;,
|
|
Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final ARG_REQUEST_CODE:Ljava/lang/String; = "INTENT_EXTRA_REQUEST_CODE"
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
|
|
.field public static final RESULT_EXTRA_LOCALE:Ljava/lang/String; = "INTENT_EXTRA_LOCALE"
|
|
|
|
|
|
# instance fields
|
|
.field public adapter:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;
|
|
|
|
.field public final list$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public requestCode:I
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lj0/o/c/q;
|
|
|
|
const-class v2, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;
|
|
|
|
invoke-static {v2}, Lj0/o/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/s/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "list"
|
|
|
|
const-string v4, "getList()Landroidx/recyclerview/widget/RecyclerView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/o/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/o/c/s;->property1(Lj0/o/c/p;)Lj0/s/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->Companion:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppDialog;-><init>()V
|
|
|
|
const v0, 0x7f0a089a
|
|
|
|
invoke-static {p0, v0}, Lj0/f;->p(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->list$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$onLocaleSelected(Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->onLocaleSelected(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getList()Landroidx/recyclerview/widget/RecyclerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->list$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->$$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, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final handleResult(ILandroid/content/Intent;Lkotlin/jvm/functions/Function2;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Landroid/content/Intent;",
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->Companion:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;->handleResult(ILandroid/content/Intent;Lkotlin/jvm/functions/Function2;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final onLocaleSelected(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v1, "INTENT_EXTRA_LOCALE"
|
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getTargetFragment()Landroidx/fragment/app/Fragment;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget v1, p0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->requestCode:I
|
|
|
|
const/4 v2, -0x1
|
|
|
|
invoke-virtual {p1, v1, v2, v0}, Landroidx/fragment/app/Fragment;->onActivityResult(IILandroid/content/Intent;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final show(Landroidx/fragment/app/Fragment;I)V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->Companion:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Companion;->show(Landroidx/fragment/app/Fragment;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d026e
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppDialog;->onResume()V
|
|
|
|
sget-object v0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->Companion:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->getList()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2, p0}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->adapter:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Adapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Model;->INSTANCE:Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Model;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect$Model;->getLocales()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppDialog;->getArgumentsOrDefault()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_EXTRA_REQUEST_CODE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/discord/widgets/settings/WidgetSettingsLanguageSelect;->requestCode:I
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {v0}, Lj0/o/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|