apkfuckery/com.discord/smali/com/discord/utilities/presence/PresenceUtils.smali

1017 lines
24 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Lcom/discord/utilities/presence/PresenceUtils;
.super Ljava/lang/Object;
.source "PresenceUtils.kt"
# static fields
.field public static final INSTANCE:Lcom/discord/utilities/presence/PresenceUtils;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/discord/utilities/presence/PresenceUtils;
invoke-direct {v0}, Lcom/discord/utilities/presence/PresenceUtils;-><init>()V
sput-object v0, Lcom/discord/utilities/presence/PresenceUtils;->INSTANCE:Lcom/discord/utilities/presence/PresenceUtils;
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final getActivityHeader(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence$Activity;)Ljava/lang/CharSequence;
2019-07-31 00:08:31 +00:00
.locals 4
2019-07-24 11:27:29 +00:00
const-string v0, "context"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
const-string v0, "activity"
2019-10-09 23:16:36 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence$Activity;->getType()I
move-result v0
2019-07-31 00:08:31 +00:00
const/4 v1, 0x0
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
const/4 v2, 0x1
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
if-eqz v0, :cond_3
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
if-eq v0, v2, :cond_2
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
const/4 v3, 0x2
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
if-eq v0, v3, :cond_1
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
const/4 v3, 0x3
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
if-eq v0, v3, :cond_0
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
:cond_0
2019-11-14 21:08:15 +00:00
const v0, 0x7f121320
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
new-array v2, v2, [Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence$Activity;->getName()Ljava/lang/String;
move-result-object p1
2019-07-31 00:08:31 +00:00
aput-object p1, v2, v1
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
invoke-virtual {p0, v0, v2}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object p0
2019-07-31 00:08:31 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
:cond_1
2019-11-14 21:08:15 +00:00
const v0, 0x7f12131b
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
new-array v2, v2, [Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence$Activity;->getName()Ljava/lang/String;
move-result-object p1
2019-07-31 00:08:31 +00:00
aput-object p1, v2, v1
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
invoke-virtual {p0, v0, v2}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object p0
2019-07-31 00:08:31 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
:cond_2
2019-11-14 21:08:15 +00:00
const v0, 0x7f12131c
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
new-array v2, v2, [Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence$Activity;->getName()Ljava/lang/String;
move-result-object p1
2019-07-31 00:08:31 +00:00
aput-object p1, v2, v1
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
invoke-virtual {p0, v0, v2}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object p0
2019-07-31 00:08:31 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
:cond_3
2019-08-01 02:26:13 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence$Activity;->getPlatform()Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
move-result-object p1
if-eqz p1, :cond_6
sget-object v0, Lcom/discord/utilities/platform/Platform;->Companion:Lcom/discord/utilities/platform/Platform$Companion;
const-string v3, "serverPlatformName"
2019-10-09 23:16:36 +00:00
invoke-static {p1, v3}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-31 00:08:31 +00:00
invoke-virtual {v0, p1}, Lcom/discord/utilities/platform/Platform$Companion;->from(Ljava/lang/String;)Lcom/discord/utilities/platform/Platform;
move-result-object v0
sget-object v3, Lcom/discord/utilities/platform/Platform;->NONE:Lcom/discord/utilities/platform/Platform;
if-ne v0, v3, :cond_4
goto :goto_0
:cond_4
invoke-virtual {v0}, Lcom/discord/utilities/platform/Platform;->getProperName()Ljava/lang/String;
move-result-object p1
2019-07-24 11:27:29 +00:00
:goto_0
2019-07-31 00:08:31 +00:00
if-eqz p1, :cond_6
2019-11-14 21:08:15 +00:00
const v0, 0x7f12131e
2019-07-31 00:08:31 +00:00
new-array v2, v2, [Ljava/lang/Object;
aput-object p1, v2, v1
invoke-virtual {p0, v0, v2}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
if-nez p1, :cond_5
goto :goto_1
:cond_5
move-object p0, p1
goto :goto_2
:cond_6
:goto_1
2019-11-14 21:08:15 +00:00
const p1, 0x7f12131d
2019-07-31 00:08:31 +00:00
invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object p0
:goto_2
2019-10-01 14:15:45 +00:00
const-string p1, "when (activity.type) {\n \u2026ity_header_playing)\n }"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
check-cast p0, Ljava/lang/CharSequence;
invoke-static {p0}, Lcom/discord/utilities/textprocessing/Parsers;->parseBoldMarkdown(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object p0
return-object p0
.end method
2019-10-17 03:51:45 +00:00
.method private final getActivityString(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence$Activity;)Ljava/lang/CharSequence;
2019-11-14 21:08:15 +00:00
.locals 3
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_0
2019-10-17 03:51:45 +00:00
return-object v0
2019-07-24 11:27:29 +00:00
:cond_0
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence$Activity;->getType()I
2019-10-17 03:51:45 +00:00
move-result v1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-direct {p0, p1, v1}, Lcom/discord/utilities/presence/PresenceUtils;->getActivityTemplate(Landroid/content/Context;I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
move-result-object p1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
if-nez p1, :cond_1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
return-object v0
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
:cond_1
sget-object v0, Lkotlin/jvm/internal/ab;->bhI:Lkotlin/jvm/internal/ab;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const/4 v0, 0x1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
new-array v1, v0, [Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const/4 v2, 0x0
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence$Activity;->getName()Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
move-result-object p2
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
aput-object p2, v1, v2
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-static {v1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
move-result-object p2
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-static {p1, p2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
move-result-object p1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const-string p2, "java.lang.String.format(format, *args)"
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-static {p1, p2}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
check-cast p1, Ljava/lang/CharSequence;
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
invoke-static {p1}, Lcom/discord/utilities/textprocessing/Parsers;->parseBoldMarkdown(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2019-07-24 11:27:29 +00:00
move-result-object p1
2019-11-14 21:08:15 +00:00
return-object p1
.end method
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
.method private final getActivityTemplate(Landroid/content/Context;I)Ljava/lang/String;
.locals 1
2019-11-10 14:21:47 +00:00
2019-11-14 21:08:15 +00:00
if-eqz p2, :cond_3
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
const/4 v0, 0x1
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
if-eq p2, v0, :cond_2
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
const/4 v0, 0x2
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
if-eq p2, v0, :cond_1
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
const/4 v0, 0x3
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
if-eq p2, v0, :cond_0
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
const/4 p1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
return-object p1
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
:cond_0
const p2, 0x7f12141e
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-10-17 03:51:45 +00:00
move-result-object p1
2019-11-14 21:08:15 +00:00
return-object p1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
:cond_1
const p2, 0x7f120b69
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-11-10 14:21:47 +00:00
2019-11-14 21:08:15 +00:00
move-result-object p1
2019-11-10 14:21:47 +00:00
2019-11-14 21:08:15 +00:00
return-object p1
2019-11-10 14:21:47 +00:00
2019-11-14 21:08:15 +00:00
:cond_2
const p2, 0x7f1211b8
2019-11-10 14:21:47 +00:00
2019-11-14 21:08:15 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-10-17 03:51:45 +00:00
move-result-object p1
2019-11-14 21:08:15 +00:00
return-object p1
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
:cond_3
const p2, 0x7f120de6
2019-10-17 03:51:45 +00:00
2019-11-14 21:08:15 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-10-17 03:51:45 +00:00
move-result-object p1
return-object p1
2019-07-24 11:27:29 +00:00
.end method
.method private final getApplicationStreamingString(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;)Ljava/lang/CharSequence;
.locals 4
if-eqz p2, :cond_0
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getPlayingActivity()Lcom/discord/models/domain/ModelPresence$Activity;
move-result-object p2
if-eqz p2, :cond_0
2019-11-14 21:08:15 +00:00
const v0, 0x7f1211b8
2019-07-24 11:27:29 +00:00
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
const-string v3, "it"
2019-10-09 23:16:36 +00:00
invoke-static {p2, v3}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence$Activity;->getName()Ljava/lang/String;
move-result-object p2
aput-object p2, v1, v2
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
if-nez p2, :cond_1
:cond_0
2019-11-14 21:08:15 +00:00
const p2, 0x7f1211b9
2019-07-24 11:27:29 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object p2
:cond_1
2019-10-01 14:15:45 +00:00
const-string p1, "presence?.playingActivit\u2026.string.streaming_a_game)"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p2, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
check-cast p2, Ljava/lang/CharSequence;
invoke-static {p2}, Lcom/discord/utilities/textprocessing/Parsers;->parseBoldMarkdown(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object p1
return-object p1
.end method
2019-11-10 14:21:47 +00:00
.method private final getStatusDraweeSpanStringBuilder(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
.locals 6
new-instance v0, Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
invoke-direct {v0}, Lcom/facebook/drawee/span/DraweeSpanStringBuilder;-><init>()V
const/4 v1, 0x0
if-eqz p2, :cond_0
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getCustomStatusActivity()Lcom/discord/models/domain/ModelPresence$Activity;
move-result-object v2
if-eqz v2, :cond_0
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence$Activity;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
move-result-object v2
if-eqz v2, :cond_0
sget-object v3, Lcom/discord/utilities/textprocessing/node/EmojiNode;->Companion:Lcom/discord/utilities/textprocessing/node/EmojiNode$Companion;
const/4 v4, 0x0
const/4 v5, 0x2
invoke-static {v3, v2, v4, v5, v1}, Lcom/discord/utilities/textprocessing/node/EmojiNode$Companion;->from$default(Lcom/discord/utilities/textprocessing/node/EmojiNode$Companion;Lcom/discord/models/domain/ModelMessageReaction$Emoji;IILjava/lang/Object;)Lcom/discord/utilities/textprocessing/node/EmojiNode;
move-result-object v1
:cond_0
if-eqz v1, :cond_1
move-object v2, v0
check-cast v2, Landroid/text/SpannableStringBuilder;
new-instance v3, Lcom/discord/utilities/presence/PresenceUtils$getStatusDraweeSpanStringBuilder$1;
invoke-direct {v3, p1, p5}, Lcom/discord/utilities/presence/PresenceUtils$getStatusDraweeSpanStringBuilder$1;-><init>(Landroid/content/Context;Z)V
check-cast v3, Lcom/discord/utilities/textprocessing/node/EmojiNode$RenderContext;
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/textprocessing/node/EmojiNode;->render(Landroid/text/SpannableStringBuilder;Lcom/discord/utilities/textprocessing/node/EmojiNode$RenderContext;)V
:cond_1
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusText(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZ)Ljava/lang/CharSequence;
move-result-object p1
if-eqz p1, :cond_3
if-eqz v1, :cond_2
const/16 p2, 0x2002
invoke-virtual {v0, p2}, Lcom/facebook/drawee/span/DraweeSpanStringBuilder;->append(C)Landroid/text/SpannableStringBuilder;
:cond_2
invoke-virtual {v0, p1}, Lcom/facebook/drawee/span/DraweeSpanStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
:cond_3
return-object v0
.end method
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
.method static synthetic getStatusDraweeSpanStringBuilder$default(Lcom/discord/utilities/presence/PresenceUtils;Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZZILjava/lang/Object;)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
.locals 7
and-int/lit8 p7, p6, 0x8
const/4 v0, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p7, :cond_0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v5, 0x0
goto :goto_0
2019-10-17 03:51:45 +00:00
:cond_0
2019-11-10 14:21:47 +00:00
move v5, p4
:goto_0
and-int/lit8 p4, p6, 0x10
if-eqz p4, :cond_1
const/4 v6, 0x0
goto :goto_1
:cond_1
move v6, p5
:goto_1
move-object v1, p0
move-object v2, p1
move-object v3, p2
move v4, p3
invoke-direct/range {v1 .. v6}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusDraweeSpanStringBuilder(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
2019-10-17 03:51:45 +00:00
move-result-object p0
return-object p0
.end method
2019-07-24 11:27:29 +00:00
.method private final getStatusIcon(Lcom/discord/models/domain/ModelPresence;)I
.locals 2
2019-10-17 03:51:45 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
if-eqz p1, :cond_0
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getStreamingActivity()Lcom/discord/models/domain/ModelPresence$Activity;
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
move-result-object v1
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
:cond_0
move-object v1, v0
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
:goto_0
if-eqz v1, :cond_1
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const p1, 0x7f080384
2019-07-24 11:27:29 +00:00
return p1
2019-10-17 03:51:45 +00:00
:cond_1
if-eqz p1, :cond_2
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getStatus()I
move-result p1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
2019-10-17 03:51:45 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
:cond_2
if-nez v0, :cond_3
2019-07-24 11:27:29 +00:00
goto :goto_1
2019-10-17 03:51:45 +00:00
:cond_3
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
move-result p1
2019-07-24 11:27:29 +00:00
const/4 v1, 0x4
2019-10-17 03:51:45 +00:00
if-ne p1, v1, :cond_4
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const p1, 0x7f080383
2019-07-24 11:27:29 +00:00
return p1
2019-10-17 03:51:45 +00:00
:cond_4
2019-07-24 11:27:29 +00:00
:goto_1
2019-10-17 03:51:45 +00:00
if-nez v0, :cond_5
2019-07-24 11:27:29 +00:00
goto :goto_2
2019-10-17 03:51:45 +00:00
:cond_5
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
move-result p1
2019-07-24 11:27:29 +00:00
const/4 v1, 0x3
2019-10-17 03:51:45 +00:00
if-ne p1, v1, :cond_6
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const p1, 0x7f080381
2019-07-24 11:27:29 +00:00
return p1
2019-10-17 03:51:45 +00:00
:cond_6
2019-07-24 11:27:29 +00:00
:goto_2
2019-10-17 03:51:45 +00:00
if-nez v0, :cond_7
2019-07-24 11:27:29 +00:00
goto :goto_3
2019-10-17 03:51:45 +00:00
:cond_7
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
move-result p1
2019-07-24 11:27:29 +00:00
const/4 v1, 0x2
2019-10-17 03:51:45 +00:00
if-ne p1, v1, :cond_8
2019-07-24 11:27:29 +00:00
2019-11-14 21:08:15 +00:00
const p1, 0x7f080380
2019-07-24 11:27:29 +00:00
return p1
2019-10-17 03:51:45 +00:00
:cond_8
2019-07-24 11:27:29 +00:00
:goto_3
2019-10-17 03:51:45 +00:00
if-nez v0, :cond_9
2019-07-24 11:27:29 +00:00
goto :goto_4
2019-10-17 03:51:45 +00:00
:cond_9
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
2019-07-24 11:27:29 +00:00
:goto_4
2019-11-14 21:08:15 +00:00
const p1, 0x7f080382
2019-07-24 11:27:29 +00:00
return p1
.end method
.method private final getStatusText(Lcom/discord/models/domain/ModelPresence;)I
.locals 2
if-eqz p1, :cond_0
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getStatus()I
move-result p1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
if-nez p1, :cond_1
goto :goto_1
:cond_1
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x4
if-ne v0, v1, :cond_2
2019-11-14 21:08:15 +00:00
const p1, 0x7f121173
2019-07-24 11:27:29 +00:00
return p1
:cond_2
:goto_1
if-nez p1, :cond_3
goto :goto_2
:cond_3
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x3
if-ne v0, v1, :cond_4
2019-11-14 21:08:15 +00:00
const p1, 0x7f12116f
2019-07-24 11:27:29 +00:00
return p1
:cond_4
:goto_2
if-nez p1, :cond_5
goto :goto_3
:cond_5
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
const/4 v0, 0x2
if-ne p1, v0, :cond_6
2019-11-14 21:08:15 +00:00
const p1, 0x7f12116d
2019-07-24 11:27:29 +00:00
return p1
:cond_6
:goto_3
2019-11-14 21:08:15 +00:00
const p1, 0x7f121172
2019-07-24 11:27:29 +00:00
return p1
.end method
2019-11-10 14:21:47 +00:00
.method private final getStatusText(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZ)Ljava/lang/CharSequence;
.locals 2
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p2, :cond_0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getCustomStatusActivity()Lcom/discord/models/domain/ModelPresence$Activity;
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
move-result-object v1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
if-eqz v1, :cond_0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {v1}, Lcom/discord/models/domain/ModelPresence$Activity;->getState()Ljava/lang/String;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object v1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:cond_0
move-object v1, v0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:goto_0
if-eqz v1, :cond_1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
check-cast v1, Ljava/lang/CharSequence;
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
return-object v1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:cond_1
if-eqz p3, :cond_2
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/presence/PresenceUtils;->getApplicationStreamingString(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;)Ljava/lang/CharSequence;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
return-object p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:cond_2
if-eqz p2, :cond_3
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getPrimaryActivity()Lcom/discord/models/domain/ModelPresence$Activity;
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p3
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:cond_3
move-object p3, v0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:goto_1
invoke-direct {p0, p1, p3}, Lcom/discord/utilities/presence/PresenceUtils;->getActivityString(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence$Activity;)Ljava/lang/CharSequence;
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p3
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p3, :cond_4
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
return-object p3
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:cond_4
if-eqz p4, :cond_5
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-direct {p0, p2}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusText(Lcom/discord/models/domain/ModelPresence;)I
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result p2
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast p1, Ljava/lang/CharSequence;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
return-object p1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
:cond_5
return-object v0
2019-07-24 11:27:29 +00:00
.end method
2019-11-10 14:21:47 +00:00
.method static synthetic getStatusText$default(Lcom/discord/utilities/presence/PresenceUtils;Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZILjava/lang/Object;)Ljava/lang/CharSequence;
.locals 0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
and-int/lit8 p5, p5, 0x8
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p5, :cond_0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p4, 0x0
2019-10-17 03:51:45 +00:00
:cond_0
2019-11-10 14:21:47 +00:00
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusText(Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZ)Ljava/lang/CharSequence;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
return-object p0
.end method
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
.method public static final setPresence(Lcom/discord/models/domain/ModelPresence;Landroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;)V
.locals 7
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v4, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/16 v5, 0x12
2019-10-17 03:51:45 +00:00
const/4 v6, 0x0
2019-11-10 14:21:47 +00:00
move-object v0, p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-object v2, p1
2019-10-17 03:51:45 +00:00
move-object v3, p2
2019-11-10 14:21:47 +00:00
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/presence/PresenceUtils;->setPresence$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;ZILjava/lang/Object;)V
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
return-void
.end method
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
.method public static final setPresence(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;)V
.locals 7
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v4, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/16 v5, 0x10
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v6, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-object v0, p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move v1, p1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
move-object v2, p2
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
move-object v3, p3
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/presence/PresenceUtils;->setPresence$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;ZILjava/lang/Object;)V
2019-10-17 03:51:45 +00:00
return-void
.end method
2019-11-10 14:21:47 +00:00
.method public static final setPresence(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;Z)V
2019-10-17 03:51:45 +00:00
.locals 9
2019-11-10 14:21:47 +00:00
const-string v0, "statusView"
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p2, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
const-string v0, "activityView"
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p3, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p0, p1, p2}, Lcom/discord/utilities/presence/PresenceUtils;->setStatusIcon(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;)V
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
sget-object v1, Lcom/discord/utilities/presence/PresenceUtils;->INSTANCE:Lcom/discord/utilities/presence/PresenceUtils;
2019-10-17 03:51:45 +00:00
invoke-virtual {p3}, Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;->getContext()Landroid/content/Context;
2019-11-10 14:21:47 +00:00
move-result-object v2
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const-string p2, "activityView.context"
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {v2, p2}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-10-17 03:51:45 +00:00
const/4 v6, 0x0
2019-11-10 14:21:47 +00:00
const/16 v7, 0x10
2019-10-17 03:51:45 +00:00
const/4 v8, 0x0
move-object v3, p0
2019-11-10 14:21:47 +00:00
move v4, p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move v5, p4
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static/range {v1 .. v8}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusDraweeSpanStringBuilder$default(Lcom/discord/utilities/presence/PresenceUtils;Landroid/content/Context;Lcom/discord/models/domain/ModelPresence;ZZZILjava/lang/Object;)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {p3, p0}, Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;->setDraweeSpanStringBuilder(Lcom/facebook/drawee/span/DraweeSpanStringBuilder;)V
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast p3, Landroid/view/View;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast p0, Ljava/lang/CharSequence;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-lez p0, :cond_0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p0, 0x1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
goto :goto_0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:cond_0
const/4 p0, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:goto_0
const/4 p2, 0x2
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p4, 0x0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p3, p0, p1, p2, p4}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
2019-07-24 11:27:29 +00:00
2019-10-17 03:51:45 +00:00
return-void
2019-11-10 14:21:47 +00:00
.end method
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
.method public static synthetic setPresence$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;ZILjava/lang/Object;)V
.locals 1
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
and-int/lit8 p6, p5, 0x2
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p6, :cond_0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
const/4 p1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:cond_0
and-int/lit8 p5, p5, 0x10
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p5, :cond_1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p4, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:cond_1
invoke-static {p0, p1, p2, p3, p4}, Lcom/discord/utilities/presence/PresenceUtils;->setPresence(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;Z)V
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
return-void
.end method
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
.method public static final setStatusIcon(Lcom/discord/models/domain/ModelPresence;Landroid/widget/ImageView;)V
.locals 3
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v0, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v1, 0x2
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v2, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p0, v0, p1, v1, v2}, Lcom/discord/utilities/presence/PresenceUtils;->setStatusIcon$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;ILjava/lang/Object;)V
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
return-void
.end method
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
.method public static final setStatusIcon(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;)V
.locals 1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const-string p1, "statusView"
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p2, p1}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
sget-object p1, Lcom/discord/utilities/presence/PresenceUtils;->INSTANCE:Lcom/discord/utilities/presence/PresenceUtils;
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
invoke-direct {p1, p0}, Lcom/discord/utilities/presence/PresenceUtils;->getStatusIcon(Lcom/discord/models/domain/ModelPresence;)I
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result p0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 p1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v0, 0x4
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {p2, p0, p1, v0, p1}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;ILcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
2019-10-17 03:51:45 +00:00
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-11-10 14:21:47 +00:00
.method public static synthetic setStatusIcon$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;ILjava/lang/Object;)V
.locals 0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
and-int/lit8 p3, p3, 0x2
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p3, :cond_0
2019-07-24 11:27:29 +00:00
2019-11-10 14:21:47 +00:00
const/4 p1, 0x0
2019-07-24 11:27:29 +00:00
:cond_0
2019-11-10 14:21:47 +00:00
invoke-static {p0, p1, p2}, Lcom/discord/utilities/presence/PresenceUtils;->setStatusIcon(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;)V
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-10-17 03:51:45 +00:00
# virtual methods
2019-11-10 14:21:47 +00:00
.method public final shouldShowRichPresenceIcon(Lcom/discord/models/domain/ModelPresence;)Z
.locals 4
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v0, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p1, :cond_3
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz p1, :cond_3
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast p1, Ljava/lang/Iterable;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
instance-of v1, p1, Ljava/util/Collection;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const/4 v2, 0x1
2019-10-17 03:51:45 +00:00
if-eqz v1, :cond_0
2019-11-10 14:21:47 +00:00
move-object v1, p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast v1, Ljava/util/Collection;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result v1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-nez v1, :cond_2
2019-10-17 03:51:45 +00:00
:cond_0
2019-11-10 14:21:47 +00:00
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object p1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:cond_1
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result v1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz v1, :cond_2
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result-object v1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
check-cast v1, Lcom/discord/models/domain/ModelPresence$Activity;
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
const-string v3, "it"
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-static {v1, v3}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
invoke-virtual {v1}, Lcom/discord/models/domain/ModelPresence$Activity;->isRichPresence()Z
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
move-result v1
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
if-eqz v1, :cond_1
const/4 p1, 0x1
goto :goto_0
2019-10-17 03:51:45 +00:00
:cond_2
2019-11-10 14:21:47 +00:00
const/4 p1, 0x0
2019-10-17 03:51:45 +00:00
2019-11-10 14:21:47 +00:00
:goto_0
if-ne p1, v2, :cond_3
return v2
2019-10-17 03:51:45 +00:00
:cond_3
2019-11-10 14:21:47 +00:00
return v0
2019-10-17 03:51:45 +00:00
.end method