472 lines
14 KiB
Smali
472 lines
14 KiB
Smali
.class public final Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "PremiumGuildSubscriptionUpsellView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lcom/discord/app/AppTextView;
|
|
|
|
.field public final e:Landroid/widget/TextView;
|
|
|
|
.field public final f:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0xe
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 7
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0xc
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 7
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/16 v5, 0x8
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3, p4}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
|
|
|
|
const p2, 0x7f0d0108
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a09c6
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026m_upsell_info_subheading)"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/app/AppTextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->d:Lcom/discord/app/AppTextView;
|
|
|
|
const p1, 0x7f0a09c8
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026ll_info_subheading_price)"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->e:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a09c7
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026ll_info_subheading_blurb)"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->f:Landroid/widget/TextView;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 1
|
|
|
|
and-int/lit8 p6, p5, 0x2
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x8
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:cond_2
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;Z)V
|
|
.locals 16
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object v2, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->f:Landroid/widget/TextView;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v4, 0x8
|
|
|
|
:goto_0
|
|
invoke-virtual {v2, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v4, v2, [Ljava/lang/Object;
|
|
|
|
sget-object v5, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_GUILD_MONTH:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->getPrice()I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "context"
|
|
|
|
invoke-static {v6, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v5, v6}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getFormattedPrice(ILandroid/content/Context;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v4, v3
|
|
|
|
const v5, 0x7f1202e6
|
|
|
|
invoke-static {v0, v5, v4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
new-array v6, v2, [Ljava/lang/Object;
|
|
|
|
sget-object v8, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_GUILD_MONTH:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->getPrice()I
|
|
|
|
move-result v8
|
|
|
|
int-to-float v8, v8
|
|
|
|
const v9, 0x3f333333 # 0.7f
|
|
|
|
mul-float v8, v8, v9
|
|
|
|
float-to-int v8, v8
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-static {v9, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v8, v9}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getFormattedPrice(ILandroid/content/Context;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v8
|
|
|
|
aput-object v8, v6, v3
|
|
|
|
invoke-static {v0, v5, v6}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const v6, 0x7f120a00
|
|
|
|
new-array v8, v2, [Ljava/lang/Object;
|
|
|
|
invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;
|
|
|
|
move-result-object v9
|
|
|
|
const v10, 0x3e99999a # 0.3f
|
|
|
|
invoke-static {v10}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {v9, v10}, Ljava/text/NumberFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
const-string v10, "NumberFormat.getPercentI\u2026ISCOUNT_PERCENT\n )"
|
|
|
|
invoke-static {v9, v10}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
aput-object v9, v8, v3
|
|
|
|
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 v6
|
|
|
|
sget-object v8, 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 v9
|
|
|
|
invoke-static {v9, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v10, 0x7f120a09
|
|
|
|
const/4 v15, 0x2
|
|
|
|
new-array v11, v15, [Ljava/lang/Object;
|
|
|
|
aput-object v5, v11, v3
|
|
|
|
aput-object v4, v11, v2
|
|
|
|
invoke-static {v0, v10, v11}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const v5, 0x7f040128
|
|
|
|
invoke-static {v0, v5}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/view/View;I)I
|
|
|
|
move-result v5
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v12
|
|
|
|
const/4 v13, 0x4
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static/range {v8 .. v14}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v8, Le/a/k/i0/a;->a:[I
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v9
|
|
|
|
aget v8, v8, v9
|
|
|
|
if-eq v8, v2, :cond_3
|
|
|
|
if-eq v8, v15, :cond_2
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-eq v8, v1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v1, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->d:Lcom/discord/app/AppTextView;
|
|
|
|
sget-object v8, 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 v9
|
|
|
|
invoke-static {v9, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v4, 0x7f120a0e
|
|
|
|
new-array v7, v15, [Ljava/lang/Object;
|
|
|
|
invoke-static {v15}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
aput-object v10, v7, v3
|
|
|
|
aput-object v6, v7, v2
|
|
|
|
invoke-static {v0, v4, v7}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/16 v13, 0xc
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static/range {v8 .. v14}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-static {v1, v5}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
iget-object v1, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->d:Lcom/discord/app/AppTextView;
|
|
|
|
sget-object v8, 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 v9
|
|
|
|
invoke-static {v9, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v4, 0x7f120a0c
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object v6, v2, v3
|
|
|
|
invoke-static {v0, v4, v2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/16 v13, 0xc
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static/range {v8 .. v14}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-static {v1, v5}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
iget-object v5, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->d:Lcom/discord/app/AppTextView;
|
|
|
|
const v6, 0x7f120a08
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object v4, v2, v3
|
|
|
|
invoke-static {v0, v6, v2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-array v3, v3, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v5, v2, v3}, Lcom/discord/app/AppTextView;->a(Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
iget-object v2, v0, Lcom/discord/views/premiumguild/PremiumGuildSubscriptionUpsellView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-static {v2, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string v2, "userPremiumTier"
|
|
|
|
invoke-static {v2}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|