129 lines
3.1 KiB
Smali
129 lines
3.1 KiB
Smali
.class public final Lcom/discord/utilities/gifting/GiftingUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "GiftingUtils.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/utilities/gifting/GiftingUtils;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/utilities/gifting/GiftingUtils;
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/gifting/GiftingUtils;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/utilities/gifting/GiftingUtils;->INSTANCE:Lcom/discord/utilities/gifting/GiftingUtils;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final generateGiftUrl(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "https://discord.gift/"
|
|
|
|
invoke-static {v0, p1}, Le/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "giftCode"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final getTimeString(JLandroid/content/res/Resources;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
sget-object v0, Lcom/discord/utilities/time/TimeUtils;->INSTANCE:Lcom/discord/utilities/time/TimeUtils;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/utilities/time/TimeUtils;->getHoursFromMillis(J)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const p1, 0x7f10002d
|
|
|
|
new-array p2, v2, [Ljava/lang/Object;
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, p2, v1
|
|
|
|
invoke-virtual {p3, p1, v0, p2}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "resources.getQuantityStr\u2026ours_hours, hours, hours)"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/utilities/time/TimeUtils;->INSTANCE:Lcom/discord/utilities/time/TimeUtils;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/utilities/time/TimeUtils;->getMinutesFromMillis(J)I
|
|
|
|
move-result p1
|
|
|
|
const p2, 0x7f10002f
|
|
|
|
new-array v0, v2, [Ljava/lang/Object;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
invoke-virtual {p3, p2, p1, v0}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "resources.getQuantityStr\u2026s_mins, minutes, minutes)"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string p1, "resources"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|