429 lines
14 KiB
Smali
429 lines
14 KiB
Smali
.class public final Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "WidgetSettingsPremiumGuildSubscriptionAdapter.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "PremiumGuildSubscriptionInfoListItem"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter;",
|
|
"Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final text$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const-class v0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v2, Lm/u/b/u;
|
|
|
|
invoke-static {v0}, Lm/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lm/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "text"
|
|
|
|
const-string v5, "getText()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lm/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lm/u/b/w;->a:Lm/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lm/u/b/x;->property1(Lm/u/b/t;)Lm/y/d;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-instance v3, Lm/u/b/u;
|
|
|
|
invoke-static {v0}, Lm/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lm/y/b;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v4, "container"
|
|
|
|
const-string v5, "getContainer()Landroid/view/View;"
|
|
|
|
invoke-direct {v3, v0, v4, v5}, Lm/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lm/u/b/w;->a:Lm/u/b/x;
|
|
|
|
invoke-virtual {v0, v3}, Lm/u/b/x;->property1(Lm/u/b/t;)Lm/y/d;
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
sput-object v1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const v0, 0x7f0d00c9
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
const p1, 0x7f0a00ea
|
|
|
|
invoke-static {p0, p1}, Le/k/a/b/e/p/g;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->text$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a00e9
|
|
|
|
invoke-static {p0, p1}, Le/k/a/b/e/p/g;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "adapter"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final getContainer()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getText()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->text$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onConfigure(ILcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;)V
|
|
.locals 12
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v1, "itemView"
|
|
|
|
invoke-static {p1, v1}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;->getBoostsRemaining()Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "context"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;->getBoostsRemaining()Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
if-lez p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->getContainer()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0800cb
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V
|
|
|
|
invoke-static {v3, v1}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "context.resources"
|
|
|
|
invoke-static {p1, v0}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v0, 0x7f100098
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;->getBoostsRemaining()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
new-array v5, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;->getBoostsRemaining()Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
aput-object p2, v5, v4
|
|
|
|
invoke-static {p1, v3, v0, v1, v5}, Lcom/discord/utilities/resources/StringResourceUtilsKt;->getQuantityString(Landroid/content/res/Resources;Landroid/content/Context;II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lcom/discord/utilities/textprocessing/Parsers;->INSTANCE:Lcom/discord/utilities/textprocessing/Parsers;
|
|
|
|
const v1, 0x7f120e32
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object p1, v2, v4
|
|
|
|
invoke-virtual {v3, v1, v2}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string p1, "context.getString(R.stri\u2026_count, boostCountString)"
|
|
|
|
invoke-static {v4, p1}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x4
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v2, v0
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->getContainer()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->getContainer()Landroid/view/View;
|
|
|
|
move-result-object v5
|
|
|
|
const v6, 0x7f040317
|
|
|
|
const/4 v7, 0x2
|
|
|
|
invoke-static {v5, v6, v4, v7, v0}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/view/View;IIILjava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;->getCooldownEndsAt()Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v5, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-wide p1, v5
|
|
|
|
:goto_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v8
|
|
|
|
sub-long/2addr p1, v8
|
|
|
|
invoke-static {p1, p2, v5, v6}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide p1
|
|
|
|
const-wide/32 v5, 0x5265c00
|
|
|
|
div-long v8, p1, v5
|
|
|
|
mul-long v5, v5, v8
|
|
|
|
sub-long/2addr p1, v5
|
|
|
|
const-wide/32 v5, 0x36ee80
|
|
|
|
div-long v10, p1, v5
|
|
|
|
mul-long v5, v5, v10
|
|
|
|
sub-long/2addr p1, v5
|
|
|
|
const-wide/32 v5, 0xea60
|
|
|
|
div-long/2addr p1, v5
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v5, Lcom/discord/utilities/textprocessing/Parsers;->INSTANCE:Lcom/discord/utilities/textprocessing/Parsers;
|
|
|
|
invoke-static {v3, v1}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v1, 0x7f120df2
|
|
|
|
const/4 v6, 0x3
|
|
|
|
new-array v6, v6, [Ljava/lang/Object;
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
aput-object v8, v6, v4
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v6, v2
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
aput-object p1, v6, v7
|
|
|
|
invoke-virtual {v3, v1, v6}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string p1, "context.getString(\n \u2026.toString()\n )"
|
|
|
|
invoke-static {v4, p1}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
const/4 v6, 0x4
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v2, v5
|
|
|
|
move-object v5, p1
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/textprocessing/Parsers;->parseMarkdown$default(Lcom/discord/utilities/textprocessing/Parsers;Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionInfoListItem;->onConfigure(ILcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscriptionAdapter$PremiumGuildSubscriptionItem;)V
|
|
|
|
return-void
|
|
.end method
|