2020-03-14 04:13:36 +00:00
|
|
|
.class public final Lcom/discord/utilities/channel/GuildChannelIconUtilsKt;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "GuildChannelIconUtils.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static final getChannelType(Lcom/discord/models/domain/ModelChannel;)Lcom/discord/utilities/channel/GuildChannelIconType;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Text;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x5
|
|
|
|
|
|
|
|
const/16 v2, 0x400
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->isNsfw()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Text;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getPermissionOverwrites()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Lcom/discord/models/domain/ModelPermissionOverwrite;
|
|
|
|
|
|
|
|
invoke-static {p0, v2}, Lcom/discord/models/domain/ModelPermissionOverwrite;->denies(Lcom/discord/models/domain/ModelPermissionOverwrite;I)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Text;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Text;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->isNsfw()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Announcements;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Announcements;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getPermissionOverwrites()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Lcom/discord/models/domain/ModelPermissionOverwrite;
|
|
|
|
|
|
|
|
invoke-static {p0, v2}, Lcom/discord/models/domain/ModelPermissionOverwrite;->denies(Lcom/discord/models/domain/ModelPermissionOverwrite;I)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Announcements;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Announcements;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
sget-object p0, Lcom/discord/utilities/channel/GuildChannelIconType$Announcements;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Announcements;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final guildChannelIcon(Lcom/discord/models/domain/ModelChannel;)I
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-static {p0}, Lcom/discord/utilities/channel/GuildChannelIconUtilsKt;->getChannelType(Lcom/discord/models/domain/ModelChannel;)Lcom/discord/utilities/channel/GuildChannelIconType;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-static {p0}, Lcom/discord/utilities/channel/GuildChannelIconUtilsKt;->mapGuildChannelTypeToIcon(Lcom/discord/utilities/channel/GuildChannelIconType;)I
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final mapGuildChannelTypeToIcon(Lcom/discord/utilities/channel/GuildChannelIconType;)I
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p0, :cond_6
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/channel/GuildChannelIconType$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Text;
|
|
|
|
|
2020-04-27 20:53:11 +00:00
|
|
|
invoke-static {p0, v0}, Lx/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f080281
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/channel/GuildChannelIconType$Announcements;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f08027c
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Text;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f080286
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/channel/GuildChannelIconType$NSFW$Announcements;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f08027e
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Text;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f080285
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
instance-of p0, p0, Lcom/discord/utilities/channel/GuildChannelIconType$Locked$Announcements;
|
|
|
|
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
|
2020-05-07 00:12:49 +00:00
|
|
|
const p0, 0x7f08027d
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_5
|
2020-04-27 20:53:11 +00:00
|
|
|
new-instance p0, Lx/g;
|
2020-03-14 04:13:36 +00:00
|
|
|
|
2020-04-27 20:53:11 +00:00
|
|
|
invoke-direct {p0}, Lx/g;-><init>()V
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
const-string p0, "guildChannelIconType"
|
|
|
|
|
2020-04-27 20:53:11 +00:00
|
|
|
invoke-static {p0}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
2020-03-14 04:13:36 +00:00
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|