2020-05-17 12:40:10 +00:00
|
|
|
.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;Landroid/util/AttributeSet;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v1, "context"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v1}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const p2, 0x7f0d0110
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
|
2020-10-31 07:32:22 +00:00
|
|
|
const p1, 0x7f0a02e4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-10-31 07:32:22 +00:00
|
|
|
const p1, 0x7f0a02e3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-10-31 07:32:22 +00:00
|
|
|
const p1, 0x7f0a02e5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-10-31 07:32:22 +00:00
|
|
|
const p1, 0x7f0a02ea
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final a(JILcom/discord/models/domain/ModelSubscription;)V
|
2020-09-23 03:12:49 +00:00
|
|
|
.locals 16
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
const v6, 0x7f121382
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
const v5, 0x7f1213a7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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)"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v4, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->d:Landroid/widget/ImageView;
|
|
|
|
|
2020-09-28 19:40:16 +00:00
|
|
|
const v8, 0x7f080182
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v5, v8}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
|
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->e:Landroid/widget/TextView;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v5, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
const v5, 0x7f1213a8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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)"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v4, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->d:Landroid/widget/ImageView;
|
|
|
|
|
2020-09-28 19:40:16 +00:00
|
|
|
const v8, 0x7f080181
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v5, v8}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
|
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->e:Landroid/widget/TextView;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v5, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
2020-09-23 03:12:49 +00:00
|
|
|
if-eqz p4, :cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelSubscription;->isGoogleSubscription()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-ne v5, v2, :cond_5
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
const-string v6, "context"
|
|
|
|
|
|
|
|
const-string v7, "infoText"
|
|
|
|
|
|
|
|
if-nez v5, :cond_6
|
|
|
|
|
|
|
|
if-eqz p4, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelSubscription;->getPlanId()J
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-wide v8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
cmp-long v5, p1, v8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
if-nez v5, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
sget-object v8, Lcom/discord/utilities/time/TimeUtils;->INSTANCE:Lcom/discord/utilities/time/TimeUtils;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelSubscription;->getCurrentPeriodEnd()Ljava/lang/String;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-object v9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-object v10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v10, v6}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const/4 v11, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const/4 v12, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const/4 v13, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const/16 v14, 0x1c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const/4 v15, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static/range {v8 .. v15}, 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;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->f:Landroid/widget/TextView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v5, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-object v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
const v8, 0x7f121384
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-array v9, v2, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
aput-object v4, v9, v3
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-virtual {v7, v8, v9}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
goto :goto_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
:cond_6
|
|
|
|
iget-object v5, v0, Lcom/discord/views/premium/AccountCreditView;->f:Landroid/widget/TextView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v5, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-object v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-27 04:20:34 +00:00
|
|
|
const v8, 0x7f121383
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-array v9, v2, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
aput-object v4, v9, v3
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-virtual {v7, v8, v9}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
:goto_4
|
2020-05-17 12:40:10 +00:00
|
|
|
iget-object v4, v0, Lcom/discord/views/premium/AccountCreditView;->g:Landroid/widget/TextView;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const-string/jumbo v5, "timeText"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v4, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v7, "resources"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v5, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v7, v6}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const v6, 0x7f1000f6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {v5, v7, v6, v1, v2}, Lcom/discord/utilities/resources/StringResourceUtilsKt;->getQuantityString(Landroid/content/res/Resources;Landroid/content/Context;II[Ljava/lang/Object;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v4, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|