824 lines
19 KiB
Smali
824 lines
19 KiB
Smali
.class public final Lcom/discord/views/ActiveSubscriptionView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "ActiveSubscriptionView.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Landroid/widget/TextView;
|
|
|
|
.field public final e:Landroid/widget/ImageView;
|
|
|
|
.field public final f:Landroid/widget/ImageView;
|
|
|
|
.field public final g:Landroid/widget/ImageView;
|
|
|
|
.field public final h:Landroid/widget/Button;
|
|
|
|
.field public final i:Landroid/view/View;
|
|
|
|
.field public final j:Landroid/widget/ProgressBar;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const-string v1, "context"
|
|
|
|
invoke-static {p1, v1}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const p2, 0x7f0d0108
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0058
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active_subscription_header_text)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->d:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0055
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active\u2026iption_header_background)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->e:Landroid/widget/ImageView;
|
|
|
|
const p1, 0x7f0a0056
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active_subscription_header_icon)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->f:Landroid/widget/ImageView;
|
|
|
|
const p1, 0x7f0a0057
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active_subscription_header_logo)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->g:Landroid/widget/ImageView;
|
|
|
|
const p1, 0x7f0a005e
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active_subscription_top_button)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/Button;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
const p1, 0x7f0a0053
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active\u2026bscription_cancel_button)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
const p1, 0x7f0a005a
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.active_subscription_progress)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/ProgressBar;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->j:Landroid/widget/ProgressBar;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Lcom/discord/views/ActiveSubscriptionView;Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;Lcom/discord/models/domain/ModelSubscription$Status;ZZLjava/lang/CharSequence;ZILkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;ZI)V
|
|
.locals 19
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p5
|
|
|
|
move/from16 v4, p11
|
|
|
|
and-int/lit8 v5, v4, 0x8
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move/from16 v5, p4
|
|
|
|
:goto_0
|
|
and-int/lit8 v7, v4, 0x20
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move/from16 v7, p6
|
|
|
|
:goto_1
|
|
and-int/lit8 v8, v4, 0x40
|
|
|
|
if-eqz v8, :cond_2
|
|
|
|
const/4 v8, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move/from16 v8, p7
|
|
|
|
:goto_2
|
|
and-int/lit16 v9, v4, 0x80
|
|
|
|
const/4 v10, 0x0
|
|
|
|
if-eqz v9, :cond_3
|
|
|
|
move-object v9, v10
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
move-object/from16 v9, p8
|
|
|
|
:goto_3
|
|
and-int/lit16 v11, v4, 0x100
|
|
|
|
if-eqz v11, :cond_4
|
|
|
|
move-object v11, v10
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
move-object/from16 v11, p9
|
|
|
|
:goto_4
|
|
and-int/lit16 v4, v4, 0x200
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move/from16 v4, p10
|
|
|
|
:goto_5
|
|
if-eqz v0, :cond_1d
|
|
|
|
const-string v10, "activeSubscriptionType"
|
|
|
|
invoke-static {v1, v10}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v10, "status"
|
|
|
|
invoke-static {v2, v10}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v10, "priceText"
|
|
|
|
invoke-static {v3, v10}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v10, v0, Lcom/discord/views/ActiveSubscriptionView;->e:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v12
|
|
|
|
const/4 v13, 0x3
|
|
|
|
const/4 v14, 0x2
|
|
|
|
if-eq v12, v14, :cond_7
|
|
|
|
if-eq v12, v13, :cond_6
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackground()I
|
|
|
|
move-result v12
|
|
|
|
goto :goto_6
|
|
|
|
:cond_6
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackgroundResub()I
|
|
|
|
move-result v12
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackgroundError()I
|
|
|
|
move-result v12
|
|
|
|
:goto_6
|
|
invoke-virtual {v10, v12}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v10, v0, Lcom/discord/views/ActiveSubscriptionView;->f:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v12
|
|
|
|
if-eq v12, v14, :cond_9
|
|
|
|
if-eq v12, v13, :cond_8
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImage()I
|
|
|
|
move-result v12
|
|
|
|
goto :goto_7
|
|
|
|
:cond_8
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImageResub()I
|
|
|
|
move-result v12
|
|
|
|
goto :goto_7
|
|
|
|
:cond_9
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImageError()I
|
|
|
|
move-result v12
|
|
|
|
:goto_7
|
|
invoke-virtual {v10, v12}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v10, v0, Lcom/discord/views/ActiveSubscriptionView;->g:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderLogo()I
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {v10, v12}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v10, v0, Lcom/discord/views/ActiveSubscriptionView;->g:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v12
|
|
|
|
const/4 v15, 0x1
|
|
|
|
if-eqz v12, :cond_c
|
|
|
|
if-eq v12, v15, :cond_b
|
|
|
|
if-ne v12, v14, :cond_a
|
|
|
|
const v12, 0x7f121269
|
|
|
|
goto :goto_8
|
|
|
|
:cond_a
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_b
|
|
const v12, 0x7f1212e0
|
|
|
|
goto :goto_8
|
|
|
|
:cond_c
|
|
const v12, 0x7f1212df
|
|
|
|
:goto_8
|
|
invoke-static {v0, v12}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-virtual {v10, v12}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v10, v0, Lcom/discord/views/ActiveSubscriptionView;->d:Landroid/widget/TextView;
|
|
|
|
sget-object v12, Lcom/discord/utilities/textprocessing/Parsers;->INSTANCE:Lcom/discord/utilities/textprocessing/Parsers;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v13
|
|
|
|
const-string v6, "context"
|
|
|
|
invoke-static {v13, v6}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_11
|
|
|
|
if-eq v6, v15, :cond_f
|
|
|
|
if-ne v6, v14, :cond_e
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v6
|
|
|
|
new-array v14, v15, [Ljava/lang/Object;
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v17
|
|
|
|
const/16 v16, 0x0
|
|
|
|
aput-object v17, v14, v16
|
|
|
|
const v15, 0x7f1000e7
|
|
|
|
invoke-virtual {v6, v15, v8, v14}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v14, "resources.getQuantityStr\u2026bscriptionCount\n )"
|
|
|
|
invoke-static {v6, v14}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v14
|
|
|
|
const/4 v15, 0x3
|
|
|
|
if-eq v14, v15, :cond_d
|
|
|
|
new-array v14, v15, [Ljava/lang/Object;
|
|
|
|
invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
aput-object v8, v14, v16
|
|
|
|
const/16 v17, 0x1
|
|
|
|
aput-object v6, v14, v17
|
|
|
|
const/4 v6, 0x2
|
|
|
|
aput-object v3, v14, v6
|
|
|
|
const v3, 0x7f12126f # 1.94163E38f
|
|
|
|
invoke-static {v0, v3, v14}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_9
|
|
|
|
:cond_d
|
|
const/16 v17, 0x1
|
|
|
|
new-array v14, v15, [Ljava/lang/Object;
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v8
|
|
|
|
aput-object v8, v14, v16
|
|
|
|
aput-object v6, v14, v17
|
|
|
|
const/4 v6, 0x2
|
|
|
|
aput-object v3, v14, v6
|
|
|
|
const v3, 0x7f121271
|
|
|
|
invoke-static {v0, v3, v14}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_9
|
|
|
|
:cond_e
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_f
|
|
const/4 v6, 0x2
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v8
|
|
|
|
const/4 v14, 0x3
|
|
|
|
if-eq v8, v14, :cond_10
|
|
|
|
const v8, 0x7f1212c5
|
|
|
|
new-array v14, v6, [Ljava/lang/Object;
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v15
|
|
|
|
const/16 v16, 0x0
|
|
|
|
aput-object v15, v14, v16
|
|
|
|
const/4 v15, 0x1
|
|
|
|
aput-object v3, v14, v15
|
|
|
|
invoke-static {v0, v8, v14}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_9
|
|
|
|
:cond_10
|
|
const/4 v15, 0x1
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const v8, 0x7f1212c6
|
|
|
|
new-array v14, v6, [Ljava/lang/Object;
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v17
|
|
|
|
aput-object v17, v14, v16
|
|
|
|
aput-object v3, v14, v15
|
|
|
|
invoke-static {v0, v8, v14}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_9
|
|
|
|
:cond_11
|
|
const/16 v16, 0x0
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v6
|
|
|
|
const/4 v8, 0x3
|
|
|
|
if-eq v6, v8, :cond_12
|
|
|
|
const v6, 0x7f1212c3
|
|
|
|
new-array v8, v15, [Ljava/lang/Object;
|
|
|
|
aput-object v3, v8, v16
|
|
|
|
invoke-static {v0, v6, v8}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_9
|
|
|
|
:cond_12
|
|
const v6, 0x7f1212c4
|
|
|
|
new-array v8, v15, [Ljava/lang/Object;
|
|
|
|
aput-object v3, v8, v16
|
|
|
|
invoke-static {v0, v6, v8}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_9
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/16 v15, 0x1c
|
|
|
|
const/16 v18, 0x0
|
|
|
|
move-object/from16 p4, v12
|
|
|
|
move-object/from16 p5, v13
|
|
|
|
move-object/from16 p6, v3
|
|
|
|
move-object/from16 p7, v6
|
|
|
|
move-object/from16 p8, v8
|
|
|
|
move-object/from16 p9, v14
|
|
|
|
move/from16 p10, v15
|
|
|
|
move-object/from16 p11, v18
|
|
|
|
invoke-static/range {p4 .. p11}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v10, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v3, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
if-nez p3, :cond_13
|
|
|
|
if-nez v7, :cond_13
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_a
|
|
|
|
:cond_13
|
|
const/4 v6, 0x0
|
|
|
|
:goto_a
|
|
const/16 v8, 0x8
|
|
|
|
if-eqz v6, :cond_14
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_14
|
|
const/16 v6, 0x8
|
|
|
|
:goto_b
|
|
invoke-virtual {v3, v6}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v3, v0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
if-nez p3, :cond_15
|
|
|
|
sget-object v6, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->PREMIUM_GUILD:Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
|
|
if-eq v1, v6, :cond_15
|
|
|
|
if-nez v7, :cond_15
|
|
|
|
sget-object v6, Lcom/discord/models/domain/ModelSubscription$Status;->CANCELED:Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
if-eq v2, v6, :cond_15
|
|
|
|
if-nez v4, :cond_15
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_15
|
|
const/4 v4, 0x0
|
|
|
|
:goto_c
|
|
if-eqz v4, :cond_16
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_d
|
|
|
|
:cond_16
|
|
const/16 v4, 0x8
|
|
|
|
:goto_d
|
|
invoke-virtual {v3, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v3, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_18
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eq v1, v4, :cond_18
|
|
|
|
const/4 v4, 0x2
|
|
|
|
if-ne v1, v4, :cond_17
|
|
|
|
const v1, 0x7f121203
|
|
|
|
goto :goto_e
|
|
|
|
:cond_17
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_18
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-eq v1, v2, :cond_19
|
|
|
|
const v1, 0x7f12032c
|
|
|
|
goto :goto_e
|
|
|
|
:cond_19
|
|
const v1, 0x7f1213c7
|
|
|
|
:goto_e
|
|
invoke-virtual {v3, v1}, Landroid/widget/Button;->setText(I)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
new-instance v2, Lj;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v2, v3, v11}, Lj;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
if-eqz v11, :cond_1a
|
|
|
|
const/16 v16, 0x1
|
|
|
|
goto :goto_f
|
|
|
|
:cond_1a
|
|
const/16 v16, 0x0
|
|
|
|
:goto_f
|
|
if-eqz v16, :cond_1b
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_10
|
|
|
|
:cond_1b
|
|
const/16 v2, 0x8
|
|
|
|
:goto_10
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
xor-int/lit8 v4, v5, 0x1
|
|
|
|
invoke-virtual {v1, v4}, Landroid/widget/Button;->setEnabled(Z)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
new-instance v4, Lj;
|
|
|
|
invoke-direct {v4, v2, v9}, Lj;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v1, v4}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v0, v0, Lcom/discord/views/ActiveSubscriptionView;->j:Landroid/widget/ProgressBar;
|
|
|
|
if-eqz v7, :cond_1c
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_11
|
|
|
|
:cond_1c
|
|
const/16 v6, 0x8
|
|
|
|
:goto_11
|
|
invoke-virtual {v0, v6}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
|
|
:cond_1d
|
|
throw v10
|
|
.end method
|
|
|
|
.method public static final b(Lcom/discord/models/domain/ModelSubscription;)Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
.locals 1
|
|
|
|
const-string v0, "subscription"
|
|
|
|
invoke-static {p0, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p0
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p0, v0, :cond_0
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq p0, v0, :cond_0
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
sget-object p0, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->PREMIUM_CLASSIC:Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
|
|
goto :goto_0
|
|
|
|
:pswitch_0
|
|
sget-object p0, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->PREMIUM_GUILD:Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
:pswitch_1
|
|
sget-object p0, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->PREMIUM:Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
|
|
:goto_0
|
|
return-object p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x6
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|