211 lines
5.3 KiB
Smali
211 lines
5.3 KiB
Smali
.class public final Lcom/discord/views/premiumguild/PremiumGuildProgressView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "PremiumGuildProgressView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Landroid/widget/ImageView;
|
|
|
|
.field public final e:Landroid/widget/TextView;
|
|
|
|
.field public final f:Landroid/widget/ProgressBar;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0d013e
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a07c6
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->d:Landroid/widget/ImageView;
|
|
|
|
const p1, 0x7f0a07c8
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->e:Landroid/widget/TextView;
|
|
|
|
const p1, 0x7f0a07c9
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/ProgressBar;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->f:Landroid/widget/ProgressBar;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(II)V
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->d:Landroid/widget/ImageView;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x3
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x2
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eq p1, v3, :cond_2
|
|
|
|
if-eq p1, v4, :cond_1
|
|
|
|
if-eq p1, v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const v1, 0x7f080272
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const v1, 0x7f080271
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const v1, 0x7f080270
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "context"
|
|
|
|
invoke-static {v5, v6}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v6, 0x7f040088
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-static {v5, v6, v1, v4, v7}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/content/Context;IIILjava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->e:Landroid/widget/TextView;
|
|
|
|
const-string v1, "levelText"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
if-eq p1, v3, :cond_6
|
|
|
|
if-eq p1, v4, :cond_5
|
|
|
|
if-eq p1, v2, :cond_4
|
|
|
|
const-string v1, ""
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f12132d
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f12132c
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f12132b
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f1212a2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/views/premiumguild/PremiumGuildProgressView;->f:Landroid/widget/ProgressBar;
|
|
|
|
const-string v1, "progress"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v1, Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;->INSTANCE:Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;
|
|
|
|
invoke-virtual {v1, p1, p2}, Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;->calculatePercentToNextTier(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ProgressBar;->setProgress(I)V
|
|
|
|
return-void
|
|
.end method
|