417 lines
11 KiB
Smali
417 lines
11 KiB
Smali
|
.class public final Lcom/discord/views/premium/AccountCreditView;
|
||
|
.super Landroidx/constraintlayout/widget/ConstraintLayout;
|
||
|
.source "AccountCreditView.kt"
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final d:Landroid/widget/ImageView;
|
||
|
|
||
|
.field public final e:Landroid/widget/TextView;
|
||
|
|
||
|
.field public final f:Landroid/widget/TextView;
|
||
|
|
||
|
.field public final g:Landroid/widget/TextView;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Landroid/content/Context;)V
|
||
|
.locals 6
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
const/4 v4, 0x6
|
||
|
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
move-object v1, p1
|
||
|
|
||
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/premium/AccountCreditView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||
|
.locals 6
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
const/4 v4, 0x4
|
||
|
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
move-object v1, p1
|
||
|
|
||
|
move-object v2, p2
|
||
|
|
||
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/premium/AccountCreditView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
.locals 0
|
||
|
.param p3 # I
|
||
|
.annotation build Landroidx/annotation/StyleRes;
|
||
|
.end annotation
|
||
|
.end param
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
invoke-direct {p0, p1, p2, p3}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
|
||
|
const p2, 0x7f0d00d7
|
||
|
|
||
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
||
|
|
||
|
const p1, 0x7f0a0286
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
check-cast p1, Landroid/widget/ImageView;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/views/premium/AccountCreditView;->d:Landroid/widget/ImageView;
|
||
|
|
||
|
const p1, 0x7f0a0285
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
check-cast p1, Landroid/widget/TextView;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/views/premium/AccountCreditView;->e:Landroid/widget/TextView;
|
||
|
|
||
|
const p1, 0x7f0a0287
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
check-cast p1, Landroid/widget/TextView;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/views/premium/AccountCreditView;->f:Landroid/widget/TextView;
|
||
|
|
||
|
const p1, 0x7f0a028c
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
check-cast p1, Landroid/widget/TextView;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/views/premium/AccountCreditView;->g:Landroid/widget/TextView;
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
const-string p1, "context"
|
||
|
|
||
|
invoke-static {p1}, Ly/v/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;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||
|
.locals 0
|
||
|
|
||
|
and-int/lit8 p5, p4, 0x2
|
||
|
|
||
|
if-eqz p5, :cond_0
|
||
|
|
||
|
const/4 p2, 0x0
|
||
|
|
||
|
:cond_0
|
||
|
and-int/lit8 p4, p4, 0x4
|
||
|
|
||
|
if-eqz p4, :cond_1
|
||
|
|
||
|
const/4 p3, 0x0
|
||
|
|
||
|
:cond_1
|
||
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/views/premium/AccountCreditView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public final a(JILcom/discord/models/domain/ModelSubscription;)V
|
||
|
.locals 18
|
||
|
|
||
|
move-object/from16 v0, p0
|
||
|
|
||
|
move/from16 v1, p3
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
if-lez v1, :cond_0
|
||
|
|
||
|
const/4 v4, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v4, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-eqz v4, :cond_1
|
||
|
|
||
|
const/4 v4, 0x0
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_1
|
||
|
const/16 v4, 0x8
|
||
|
|
||
|
:goto_1
|
||
|
invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
|
||
|
|
||
|
if-gtz v1, :cond_2
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_2
|
||
|
sget-object v4, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_MONTH_TIER_1:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
||
|
|
||
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->getPlanId()J
|
||
|
|
||
|
move-result-wide v4
|
||
|
|
||
|
const v6, 0x7f1210f5
|
||
|
|
||
|
const-string v7, "header"
|
||
|
|
||
|
cmp-long v8, p1, v4
|
||
|
|
||
|
if-nez v8, :cond_3
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const v5, 0x7f121116
|
||
|
|
||
|
invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const-string v5, "context.getString(R.string.premium_tier_1)"
|
||
|
|
||
|
invoke-static {v4, v5}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->d:Landroid/widget/ImageView;
|
||
|
|
||
|
const v8, 0x7f080155
|
||
|
|
||
|
invoke-virtual {v5, v8}, Landroid/widget/ImageView;->setImageResource(I)V
|
||
|
|
||
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->e:Landroid/widget/TextView;
|
||
|
|
||
|
invoke-static {v5, v7}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v7
|
||
|
|
||
|
new-array v8, v2, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object v4, v8, v3
|
||
|
|
||
|
invoke-virtual {v7, v6, v8}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
goto :goto_2
|
||
|
|
||
|
:cond_3
|
||
|
sget-object v4, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_MONTH_TIER_2:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
||
|
|
||
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->getPlanId()J
|
||
|
|
||
|
move-result-wide v4
|
||
|
|
||
|
cmp-long v8, p1, v4
|
||
|
|
||
|
if-nez v8, :cond_4
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const v5, 0x7f121117
|
||
|
|
||
|
invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const-string v5, "context.getString(R.string.premium_tier_2)"
|
||
|
|
||
|
invoke-static {v4, v5}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->d:Landroid/widget/ImageView;
|
||
|
|
||
|
const v8, 0x7f080154
|
||
|
|
||
|
invoke-virtual {v5, v8}, Landroid/widget/ImageView;->setImageResource(I)V
|
||
|
|
||
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->e:Landroid/widget/TextView;
|
||
|
|
||
|
invoke-static {v5, v7}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v7
|
||
|
|
||
|
new-array v8, v2, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object v4, v8, v3
|
||
|
|
||
|
invoke-virtual {v7, v6, v8}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
goto :goto_2
|
||
|
|
||
|
:cond_4
|
||
|
const-string v4, ""
|
||
|
|
||
|
:goto_2
|
||
|
const-string v5, "context"
|
||
|
|
||
|
const-string v6, "infoText"
|
||
|
|
||
|
if-eqz p4, :cond_5
|
||
|
|
||
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelSubscription;->getPlanId()J
|
||
|
|
||
|
move-result-wide v7
|
||
|
|
||
|
cmp-long v9, p1, v7
|
||
|
|
||
|
if-nez v9, :cond_5
|
||
|
|
||
|
sget-object v10, Lcom/discord/utilities/time/TimeUtils;->INSTANCE:Lcom/discord/utilities/time/TimeUtils;
|
||
|
|
||
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelSubscription;->getCurrentPeriodEnd()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v11
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v12
|
||
|
|
||
|
invoke-static {v12, v5}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
const/4 v13, 0x0
|
||
|
|
||
|
const/4 v14, 0x0
|
||
|
|
||
|
const/4 v15, 0x0
|
||
|
|
||
|
const/16 v16, 0x1c
|
||
|
|
||
|
const/16 v17, 0x0
|
||
|
|
||
|
invoke-static/range {v10 .. v17}, Lcom/discord/utilities/time/TimeUtils;->renderUtcDate$default(Lcom/discord/utilities/time/TimeUtils;Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ljava/text/DateFormat;IILjava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
iget-object v7, v0, Lcom/discord/views/premium/AccountCreditView;->f:Landroid/widget/TextView;
|
||
|
|
||
|
invoke-static {v7, v6}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
const v8, 0x7f1210f7
|
||
|
|
||
|
new-array v9, v2, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object v4, v9, v3
|
||
|
|
||
|
invoke-virtual {v6, v8, v9}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-virtual {v7, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
goto :goto_3
|
||
|
|
||
|
:cond_5
|
||
|
iget-object v7, v0, Lcom/discord/views/premium/AccountCreditView;->f:Landroid/widget/TextView;
|
||
|
|
||
|
invoke-static {v7, v6}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
const v8, 0x7f1210f6
|
||
|
|
||
|
new-array v9, v2, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object v4, v9, v3
|
||
|
|
||
|
invoke-virtual {v6, v8, v9}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-virtual {v7, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
:goto_3
|
||
|
iget-object v4, v0, Lcom/discord/views/premium/AccountCreditView;->g:Landroid/widget/TextView;
|
||
|
|
||
|
const-string v6, "timeText"
|
||
|
|
||
|
invoke-static {v4, v6}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
const-string v7, "resources"
|
||
|
|
||
|
invoke-static {v6, v7}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v7
|
||
|
|
||
|
invoke-static {v7, v5}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
const v5, 0x7f1000de
|
||
|
|
||
|
new-array v2, v2, [Ljava/lang/Object;
|
||
|
|
||
|
invoke-static/range {p3 .. p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object v8
|
||
|
|
||
|
aput-object v8, v2, v3
|
||
|
|
||
|
invoke-static {v6, v7, v5, v1, v2}, Lcom/discord/utilities/resources/StringResourceUtilsKt;->getQuantityString(Landroid/content/res/Resources;Landroid/content/Context;II[Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v4, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|