391 lines
13 KiB
Smali
391 lines
13 KiB
Smali
.class public final Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "PremiumSubscriptionMarketingView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Landroid/widget/TextView;
|
|
|
|
.field public final e:Landroid/widget/TextView;
|
|
|
|
.field public final f:Landroid/widget/TextView;
|
|
|
|
.field public final g:Landroid/widget/TextView;
|
|
|
|
.field public final h:Landroid/view/View;
|
|
|
|
.field public final i:Landroid/view/View;
|
|
|
|
.field public final j:Landroid/view/View;
|
|
|
|
.field public final k:Landroid/widget/TextView;
|
|
|
|
.field public final l:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p2, v0, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
|
|
|
|
const p2, 0x7f0d0136
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0acf
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026ing_nitro_boost_discount)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->d:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0ace
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026keting_nitro_boost_count)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->e:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0ad1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026o_classic_boost_discount)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->f:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0ad0
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026itro_classic_boost_count)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->g:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0aca
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026ium_marketing_learn_more)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->h:Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0acb
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026ting_marketing_container)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->i:Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0ac9
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026arketing_container_tier1)"
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->j:Landroid/view/View;
|
|
|
|
const p1, 0x7f0a0acd
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026arketing_marketing_title)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->k:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a0acc
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "findViewById(R.id.view_p\u2026eting_marketing_subtitle)"
|
|
|
|
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/premiumguild/PremiumSubscriptionMarketingView;->l:Landroid/widget/TextView;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;Lkotlin/jvm/functions/Function0;)V
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string/jumbo v0, "userPremiumTier"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "onlearnMoreClickCallback"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v2, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
aput-object v4, v2, v5
|
|
|
|
const v4, 0x7f10008c
|
|
|
|
invoke-virtual {v0, v4, v3, v2}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "resources.getQuantityStr\u2026PTIONS_WITH_PREMIUM\n )"
|
|
|
|
invoke-static {v0, v2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->d:Landroid/widget/TextView;
|
|
|
|
new-array v4, v1, [Ljava/lang/Object;
|
|
|
|
invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;
|
|
|
|
move-result-object v6
|
|
|
|
const v7, 0x3e99999a # 0.3f
|
|
|
|
invoke-static {v7}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v6, v7}, Ljava/text/NumberFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v8, "NumberFormat.getPercentI\u2026ISCOUNT_PERCENT\n )"
|
|
|
|
invoke-static {v6, v8}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
aput-object v6, v4, v5
|
|
|
|
const v6, 0x7f120b1a
|
|
|
|
invoke-static {p0, v6, v4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->e:Landroid/widget/TextView;
|
|
|
|
new-array v4, v1, [Ljava/lang/Object;
|
|
|
|
aput-object v0, v4, v5
|
|
|
|
const v9, 0x7f120b1c
|
|
|
|
invoke-static {p0, v9, v4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->f:Landroid/widget/TextView;
|
|
|
|
new-array v4, v1, [Ljava/lang/Object;
|
|
|
|
invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v9, v7}, Ljava/text/NumberFormat;->format(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v7, v8}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
aput-object v7, v4, v5
|
|
|
|
invoke-static {p0, v6, v4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->g:Landroid/widget/TextView;
|
|
|
|
new-array v4, v1, [Ljava/lang/Object;
|
|
|
|
aput-object v0, v4, v5
|
|
|
|
const v0, 0x7f120b1b
|
|
|
|
invoke-static {p0, v0, v4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->h:Landroid/view/View;
|
|
|
|
new-instance v2, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView$a;
|
|
|
|
invoke-direct {v2, p2}, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView$a;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
const/16 p2, 0x8
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eq p1, v1, :cond_1
|
|
|
|
if-eq p1, v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->i:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->i:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->k:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f120b1f
|
|
|
|
invoke-static {p0, p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->l:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f120b20
|
|
|
|
new-array v0, v1, [Ljava/lang/Object;
|
|
|
|
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v5
|
|
|
|
invoke-static {p0, p2, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->i:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->k:Landroid/widget/TextView;
|
|
|
|
const v0, 0x7f120b1e
|
|
|
|
invoke-static {p0, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/premiumguild/PremiumSubscriptionMarketingView;->l:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|