370 lines
9.4 KiB
Smali
370 lines
9.4 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;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0d00e6
|
|
|
|
invoke-static {p1, v0, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a05d1
|
|
|
|
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, 0x7f0a05d3
|
|
|
|
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, 0x7f0a05d4
|
|
|
|
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
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
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, 0x7f0d00e6
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a05d1
|
|
|
|
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, 0x7f0a05d3
|
|
|
|
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, 0x7f0a05d4
|
|
|
|
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
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0d00e6
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const p1, 0x7f0a05d1
|
|
|
|
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, 0x7f0a05d3
|
|
|
|
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, 0x7f0a05d4
|
|
|
|
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
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lt/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;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/premiumguild/PremiumGuildProgressView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/views/premiumguild/PremiumGuildProgressView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
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, 0x7f080215
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const v1, 0x7f080214
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const v1, 0x7f080213
|
|
|
|
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}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v6, 0x7f04007b
|
|
|
|
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}, Lt/u/b/j;->checkExpressionValueIsNotNull(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, 0x7f120f11
|
|
|
|
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, 0x7f120f10
|
|
|
|
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, 0x7f120f0f
|
|
|
|
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, 0x7f120e91
|
|
|
|
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}, Lt/u/b/j;->checkExpressionValueIsNotNull(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
|