876 lines
28 KiB
Smali
876 lines
28 KiB
Smali
.class public final Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
.super Lcom/discord/app/AppDialog;
|
|
.source "WidgetCancelPremiumDialog.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final bodyPart1Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final bodyPart2Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final cancelBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final confirmBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final errorDivider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final errorTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final grandfatheredIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final headerTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public viewModel:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/16 v0, 0x8
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Ls/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v2}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "headerTv"
|
|
|
|
const-string v4, "getHeaderTv()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v2, v1}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "grandfatheredIndicator"
|
|
|
|
const-string v5, "getGrandfatheredIndicator()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "bodyPart1Tv"
|
|
|
|
const-string v5, "getBodyPart1Tv()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "bodyPart2Tv"
|
|
|
|
const-string v5, "getBodyPart2Tv()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x4
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "cancelBtn"
|
|
|
|
const-string v5, "getCancelBtn()Landroid/widget/Button;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x5
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "confirmBtn"
|
|
|
|
const-string v5, "getConfirmBtn()Lcom/discord/views/LoadingButton;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x6
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "errorTv"
|
|
|
|
const-string v5, "getErrorTv()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x7
|
|
|
|
new-instance v2, Ls/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
invoke-static {v3}, Ls/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ls/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "errorDivider"
|
|
|
|
const-string v5, "getErrorDivider()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ls/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ls/u/b/w;->a:Ls/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ls/u/b/x;->property1(Ls/u/b/t;)Ls/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppDialog;-><init>()V
|
|
|
|
const v0, 0x7f0a011f
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->headerTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a011e
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->grandfatheredIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a0119
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->bodyPart1Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a011a
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->bodyPart2Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a011b
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->cancelBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a011c
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->confirmBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a011d
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->errorTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a02d3
|
|
|
|
invoke-static {p0, v0}, Le/k/a/b/e/p/g;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->errorDivider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->configureUI(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getViewModel$p(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->viewModel:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const-string p0, "viewModel"
|
|
|
|
invoke-static {p0}, Ls/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setViewModel$p(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->viewModel:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;)V
|
|
.locals 11
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move-object v0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, p1
|
|
|
|
:goto_0
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v2
|
|
|
|
aget v2, v3, v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
packed-switch v2, :pswitch_data_0
|
|
|
|
const-string v2, ""
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:pswitch_0
|
|
const v2, 0x7f120e9c
|
|
|
|
invoke-virtual {p0, v2}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v4, "getString(R.string.premium_tier_1)"
|
|
|
|
invoke-static {v2, v4}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v4, 0x7f120d87
|
|
|
|
const v5, 0x7f120d88
|
|
|
|
goto :goto_1
|
|
|
|
:pswitch_1
|
|
const v2, 0x7f120e9d
|
|
|
|
invoke-virtual {p0, v2}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v4, "getString(R.string.premium_tier_2)"
|
|
|
|
invoke-static {v2, v4}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v4, 0x7f120d8a
|
|
|
|
const v5, 0x7f120d8b
|
|
|
|
:goto_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getHeaderTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v6
|
|
|
|
const v7, 0x7f120d8e
|
|
|
|
const/4 v8, 0x1
|
|
|
|
new-array v9, v8, [Ljava/lang/Object;
|
|
|
|
aput-object v2, v9, v3
|
|
|
|
invoke-virtual {p0, v7, v9}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v6, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v6, "requireContext()"
|
|
|
|
invoke-static {v2, v6}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lcom/discord/utilities/locale/LocaleUtilsKt;->getPrimaryLocale(Landroid/content/Context;)Ljava/util/Locale;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v6, Ljava/util/Date;
|
|
|
|
invoke-static {}, Lcom/miguelgaeta/simple_time/SimpleTime;->getDefault()Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getCurrentPeriodEnd()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v7, v9}, Lcom/miguelgaeta/simple_time/SimpleTime;->parseUTCDate(Ljava/lang/String;)J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-direct {v6, v9, v10}, Ljava/util/Date;-><init>(J)V
|
|
|
|
new-instance v7, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v9, "MMM dd yyyy"
|
|
|
|
invoke-direct {v7, v9, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
|
|
|
|
invoke-virtual {v7, v6}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getBodyPart1Tv()Landroid/widget/TextView;
|
|
|
|
move-result-object v6
|
|
|
|
new-array v7, v8, [Ljava/lang/Object;
|
|
|
|
aput-object v2, v7, v3
|
|
|
|
invoke-virtual {p0, v4, v7}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v4, "getString(bodyPart1StringRes, endDateString)"
|
|
|
|
invoke-static {v2, v4}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Le/a/g/a/b/b;->a(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v6, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getBodyPart2Tv()Landroid/widget/TextView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0, v5}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "getString(bodyPart2StringRes)"
|
|
|
|
invoke-static {v4, v5}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v4}, Le/a/g/a/b/b;->a(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getGrandfatheredIndicator()Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->isGrandfathered()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
invoke-static {v2, v0, v3, v4, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->isBusy()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getCancelBtn()Landroid/widget/Button;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getConfirmBtn()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getConfirmBtn()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v8}, Lcom/discord/views/LoadingButton;->setIsLoading(Z)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getCancelBtn()Landroid/widget/Button;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$configureUI$1;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$configureUI$1;-><init>(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getConfirmBtn()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$configureUI$2;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$configureUI$2;-><init>(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getConfirmBtn()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v3}, Lcom/discord/views/LoadingButton;->setIsLoading(Z)V
|
|
|
|
:goto_2
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getDialog()Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
move-object p1, v1
|
|
|
|
:cond_2
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getErrorTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;->getHasError()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v0, v2, v3, v4, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->getErrorDivider()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;->getHasError()Z
|
|
|
|
move-result p1
|
|
|
|
invoke-static {v0, p1, v3, v4, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private final getBodyPart1Tv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->bodyPart1Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$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, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getBodyPart2Tv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->bodyPart2Tv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$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 getCancelBtn()Landroid/widget/Button;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->cancelBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
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/Button;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getConfirmBtn()Lcom/discord/views/LoadingButton;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->confirmBtn$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
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/discord/views/LoadingButton;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getErrorDivider()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->errorDivider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x7
|
|
|
|
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 getErrorTv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->errorTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x6
|
|
|
|
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 getGrandfatheredIndicator()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->grandfatheredIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$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 getHeaderTv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->headerTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->$$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 getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d00e2
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 10
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppDialog;->onResume()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/fragment/app/DialogFragment;->setCancelable(Z)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Factory;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Factory;-><init>()V
|
|
|
|
invoke-static {v0, v1}, Landroidx/lifecycle/ViewModelProviders;->of(Landroidx/fragment/app/FragmentActivity;Landroidx/lifecycle/ViewModelProvider$Factory;)Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "ViewModelProviders\n \u2026iumViewModel::class.java)"
|
|
|
|
invoke-static {v0, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->viewModel:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;->viewModel:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Le/a/b/c0;->observeViewState()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->bindToComponentLifecycle(Lrx/Observable;Lcom/discord/app/AppComponent;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$onResume$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog$onResume$1;-><init>(Lcom/discord/widgets/settings/premium/WidgetCancelPremiumDialog;)V
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "viewModel"
|
|
|
|
invoke-static {v0}, Ls/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|