2020-07-08 16:44:49 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "EmojiPickerViewModel.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Companion"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$buildEmojiListItems(Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;Ljava/util/List;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;->buildEmojiListItems(Ljava/util/List;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$buildGuildEmojiListItems(Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/emoji/EmojiSet;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;->buildGuildEmojiListItems(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/emoji/EmojiSet;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final buildEmojiListItems(Ljava/util/List;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/emoji/Emoji;",
|
|
|
|
">;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Z)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Lcom/discord/models/domain/emoji/Emoji;->getNames()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
|
|
|
|
const-string v4, "name"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v3, v4}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "Locale.getDefault()"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v4, v5}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "(this as java.lang.String).toLowerCase(locale)"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v4, v5}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x2
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v4, p2, v5, v6}, Li0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
new-instance v2, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiAdapterV2$EmojiItem;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-direct {v2, v1, v3, p3}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiAdapterV2$EmojiItem;-><init>(Lcom/discord/models/domain/emoji/Emoji;Ljava/lang/String;Z)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final buildGuildEmojiListItems(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/emoji/EmojiSet;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
|
|
"Lcom/discord/models/domain/emoji/EmojiSet;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Z)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
sget-object p1, Li0/i/n;->d:Li0/i/n;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
iget-object p2, p2, Lcom/discord/models/domain/emoji/EmojiSet;->customEmojis:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Ljava/util/List;
|
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiAdapterV2$HeaderItem$GuildHeaderItem;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiAdapterV2$HeaderItem$GuildHeaderItem;-><init>(Lcom/discord/models/domain/ModelGuild;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-direct {p0, p2, p3, p4}, Lcom/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion;->buildEmojiListItems(Ljava/util/List;Ljava/lang/String;Z)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
const/4 p2, 0x1
|
|
|
|
|
|
|
|
if-le p1, p2, :cond_1
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-22 00:04:40 +00:00
|
|
|
sget-object p1, Li0/i/n;->d:Li0/i/n;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|