771 lines
18 KiB
Smali
771 lines
18 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 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const p2, 0x7f0d00f3
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0052
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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, 0x7f0a004f
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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, 0x7f0a0050
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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, 0x7f0a0051
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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, 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_top_button)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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, 0x7f0a004d
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0054
|
|
|
|
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}, Lj0/n/c/h;->checkExpressionValueIsNotNull(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
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.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 23
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move/from16 v3, p11
|
|
|
|
and-int/lit8 v4, v3, 0x8
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move/from16 v4, p4
|
|
|
|
:goto_0
|
|
and-int/lit8 v6, v3, 0x20
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move/from16 v6, p6
|
|
|
|
:goto_1
|
|
and-int/lit8 v7, v3, 0x40
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
const/4 v7, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move/from16 v7, p7
|
|
|
|
:goto_2
|
|
and-int/lit16 v8, v3, 0x80
|
|
|
|
const/4 v9, 0x0
|
|
|
|
if-eqz v8, :cond_3
|
|
|
|
move-object v8, v9
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
move-object/from16 v8, p8
|
|
|
|
:goto_3
|
|
and-int/lit16 v10, v3, 0x100
|
|
|
|
if-eqz v10, :cond_4
|
|
|
|
move-object v10, v9
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
move-object/from16 v10, p9
|
|
|
|
:goto_4
|
|
and-int/lit16 v3, v3, 0x200
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move/from16 v3, p10
|
|
|
|
:goto_5
|
|
if-eqz v1, :cond_1b
|
|
|
|
if-eqz v2, :cond_1a
|
|
|
|
iget-object v9, v0, Lcom/discord/views/ActiveSubscriptionView;->e:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v11
|
|
|
|
const/4 v12, 0x2
|
|
|
|
const/4 v13, 0x3
|
|
|
|
if-eq v11, v12, :cond_7
|
|
|
|
if-eq v11, v13, :cond_6
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackground()I
|
|
|
|
move-result v11
|
|
|
|
goto :goto_6
|
|
|
|
:cond_6
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackgroundResub()I
|
|
|
|
move-result v11
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderBackgroundError()I
|
|
|
|
move-result v11
|
|
|
|
:goto_6
|
|
invoke-virtual {v9, v11}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v9, v0, Lcom/discord/views/ActiveSubscriptionView;->f:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v11
|
|
|
|
if-eq v11, v12, :cond_9
|
|
|
|
if-eq v11, v13, :cond_8
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImage()I
|
|
|
|
move-result v11
|
|
|
|
goto :goto_7
|
|
|
|
:cond_8
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImageResub()I
|
|
|
|
move-result v11
|
|
|
|
goto :goto_7
|
|
|
|
:cond_9
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderImageError()I
|
|
|
|
move-result v11
|
|
|
|
:goto_7
|
|
invoke-virtual {v9, v11}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v9, v0, Lcom/discord/views/ActiveSubscriptionView;->g:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->getHeaderLogo()I
|
|
|
|
move-result v11
|
|
|
|
invoke-virtual {v9, v11}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v9, v0, Lcom/discord/views/ActiveSubscriptionView;->d:Landroid/widget/TextView;
|
|
|
|
sget-object v14, 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 v15
|
|
|
|
const-string v11, "context"
|
|
|
|
invoke-static {v15, v11}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v11
|
|
|
|
const/4 v13, 0x1
|
|
|
|
if-eqz v11, :cond_e
|
|
|
|
if-eq v11, v13, :cond_c
|
|
|
|
if-ne v11, v12, :cond_b
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v11
|
|
|
|
new-array v12, v13, [Ljava/lang/Object;
|
|
|
|
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v16
|
|
|
|
aput-object v16, v12, v5
|
|
|
|
const v13, 0x7f1000e3
|
|
|
|
invoke-virtual {v11, v13, v7, v12}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
const-string v12, "resources.getQuantityStr\u2026bscriptionCount\n )"
|
|
|
|
invoke-static {v11, v12}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v12
|
|
|
|
const/4 v13, 0x3
|
|
|
|
if-eq v12, v13, :cond_a
|
|
|
|
new-array v12, v13, [Ljava/lang/Object;
|
|
|
|
invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
aput-object v7, v12, v5
|
|
|
|
const/16 v16, 0x1
|
|
|
|
aput-object v11, v12, v16
|
|
|
|
const/4 v7, 0x2
|
|
|
|
aput-object p5, v12, v7
|
|
|
|
const v11, 0x7f1211f2
|
|
|
|
invoke-static {v0, v11, v12}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
goto :goto_8
|
|
|
|
:cond_a
|
|
const/16 v16, 0x1
|
|
|
|
new-array v12, v13, [Ljava/lang/Object;
|
|
|
|
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v7
|
|
|
|
aput-object v7, v12, v5
|
|
|
|
aput-object v11, v12, v16
|
|
|
|
const/4 v7, 0x2
|
|
|
|
aput-object p5, v12, v7
|
|
|
|
const v11, 0x7f1211f4
|
|
|
|
invoke-static {v0, v11, v12}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
:goto_8
|
|
const/4 v13, 0x1
|
|
|
|
goto :goto_9
|
|
|
|
:cond_b
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_c
|
|
const/4 v7, 0x2
|
|
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v11
|
|
|
|
const/4 v12, 0x3
|
|
|
|
if-eq v11, v12, :cond_d
|
|
|
|
const v11, 0x7f121239
|
|
|
|
new-array v12, v7, [Ljava/lang/Object;
|
|
|
|
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v13
|
|
|
|
aput-object v13, v12, v5
|
|
|
|
const/4 v13, 0x1
|
|
|
|
aput-object p5, v12, v13
|
|
|
|
invoke-static {v0, v11, v12}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
:goto_9
|
|
move-object/from16 v16, v11
|
|
|
|
goto :goto_b
|
|
|
|
:cond_d
|
|
const/4 v13, 0x1
|
|
|
|
const v11, 0x7f12123a
|
|
|
|
new-array v12, v7, [Ljava/lang/Object;
|
|
|
|
invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v16
|
|
|
|
aput-object v16, v12, v5
|
|
|
|
aput-object p5, v12, v13
|
|
|
|
invoke-static {v0, v11, v12}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
goto :goto_a
|
|
|
|
:cond_e
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v7
|
|
|
|
const/4 v11, 0x3
|
|
|
|
if-eq v7, v11, :cond_f
|
|
|
|
const v7, 0x7f121237
|
|
|
|
new-array v11, v13, [Ljava/lang/Object;
|
|
|
|
aput-object p5, v11, v5
|
|
|
|
invoke-static {v0, v7, v11}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
goto :goto_a
|
|
|
|
:cond_f
|
|
const v7, 0x7f121238
|
|
|
|
new-array v11, v13, [Ljava/lang/Object;
|
|
|
|
aput-object p5, v11, v5
|
|
|
|
invoke-static {v0, v7, v11}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
:goto_a
|
|
move-object/from16 v16, v7
|
|
|
|
:goto_b
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
const/16 v20, 0x0
|
|
|
|
const/16 v21, 0x3c
|
|
|
|
const/16 v22, 0x0
|
|
|
|
invoke-static/range {v14 .. v22}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;Ljava/lang/Integer;ZLkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v9, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v7, v0, Lcom/discord/views/ActiveSubscriptionView;->h:Landroid/widget/Button;
|
|
|
|
if-nez p3, :cond_10
|
|
|
|
if-nez v6, :cond_10
|
|
|
|
const/4 v9, 0x1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_10
|
|
const/4 v9, 0x0
|
|
|
|
:goto_c
|
|
const/16 v11, 0x8
|
|
|
|
if-eqz v9, :cond_11
|
|
|
|
const/4 v9, 0x0
|
|
|
|
goto :goto_d
|
|
|
|
:cond_11
|
|
const/16 v9, 0x8
|
|
|
|
:goto_d
|
|
invoke-virtual {v7, v9}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v7, v0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
if-nez p3, :cond_12
|
|
|
|
sget-object v9, Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;->PREMIUM_GUILD:Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
|
|
if-eq v1, v9, :cond_12
|
|
|
|
if-nez v6, :cond_12
|
|
|
|
sget-object v9, Lcom/discord/models/domain/ModelSubscription$Status;->CANCELED:Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
if-eq v2, v9, :cond_12
|
|
|
|
if-nez v3, :cond_12
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_e
|
|
|
|
:cond_12
|
|
const/4 v3, 0x0
|
|
|
|
:goto_e
|
|
if-eqz v3, :cond_13
|
|
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_f
|
|
|
|
:cond_13
|
|
const/16 v3, 0x8
|
|
|
|
:goto_f
|
|
invoke-virtual {v7, v3}, 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_15
|
|
|
|
const/4 v7, 0x1
|
|
|
|
if-eq v1, v7, :cond_15
|
|
|
|
const/4 v7, 0x2
|
|
|
|
if-ne v1, v7, :cond_14
|
|
|
|
const v1, 0x7f121187
|
|
|
|
goto :goto_10
|
|
|
|
:cond_14
|
|
new-instance v0, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {v0}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_15
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-eq v1, v2, :cond_16
|
|
|
|
const v1, 0x7f120322
|
|
|
|
goto :goto_10
|
|
|
|
:cond_16
|
|
const v1, 0x7f121339
|
|
|
|
:goto_10
|
|
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;
|
|
|
|
invoke-direct {v2, v5, v10}, 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 v10, :cond_17
|
|
|
|
const/16 v16, 0x1
|
|
|
|
goto :goto_11
|
|
|
|
:cond_17
|
|
const/16 v16, 0x0
|
|
|
|
:goto_11
|
|
if-eqz v16, :cond_18
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_12
|
|
|
|
:cond_18
|
|
const/16 v2, 0x8
|
|
|
|
:goto_12
|
|
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 v3, v4, 0x1
|
|
|
|
invoke-virtual {v1, v3}, Landroid/widget/Button;->setEnabled(Z)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/ActiveSubscriptionView;->i:Landroid/view/View;
|
|
|
|
new-instance v3, Lj;
|
|
|
|
invoke-direct {v3, v2, v8}, Lj;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v1, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v0, v0, Lcom/discord/views/ActiveSubscriptionView;->j:Landroid/widget/ProgressBar;
|
|
|
|
if-eqz v6, :cond_19
|
|
|
|
goto :goto_13
|
|
|
|
:cond_19
|
|
const/16 v5, 0x8
|
|
|
|
:goto_13
|
|
invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
|
|
:cond_1a
|
|
const-string v0, "status"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v9
|
|
|
|
:cond_1b
|
|
const-string v0, "activeSubscriptionType"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v9
|
|
.end method
|
|
|
|
.method public static final b(Lcom/discord/models/domain/ModelSubscription;)Lcom/discord/views/ActiveSubscriptionView$ActiveSubscriptionType;
|
|
.locals 1
|
|
|
|
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
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x6
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|