1437 lines
38 KiB
Smali
1437 lines
38 KiB
Smali
.class public final Lcom/discord/stores/StoreEmoji;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreEmoji.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/utilities/textprocessing/Rules$EmojiDataProvider;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreEmoji$EmojiContext;,
|
|
Lcom/discord/stores/StoreEmoji$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/stores/StoreEmoji$Companion;
|
|
|
|
.field public static final DEFAULT_FREQUENT_EMOJIS:[Ljava/lang/String;
|
|
|
|
.field public static final MAX_FREQUENTLY_USED_EMOJIS:I = 0x28
|
|
|
|
|
|
# instance fields
|
|
.field public final customEmojiStore:Lcom/discord/stores/StoreEmojiCustom;
|
|
|
|
.field public final frecency:Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
.field public final frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Lcom/discord/utilities/emoji/EmojiFrecencyTracker;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
.field public final sortedGuildsStore:Lcom/discord/stores/StoreGuildsSorted;
|
|
|
|
.field public unicodeEmojiSurrogateMap:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Lcom/discord/models/domain/emoji/ModelEmojiUnicode;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public unicodeEmojis:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Lcom/discord/models/domain/emoji/EmojiCategory;",
|
|
"+",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/emoji/Emoji;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public unicodeEmojisNamesMap:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Lcom/discord/models/domain/emoji/ModelEmojiUnicode;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public unicodeEmojisPattern:Ljava/util/regex/Pattern;
|
|
|
|
.field public final userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 10
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreEmoji$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreEmoji$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreEmoji;->Companion:Lcom/discord/stores/StoreEmoji$Companion;
|
|
|
|
const-string v2, "bread"
|
|
|
|
const-string v3, "fork_and_knife"
|
|
|
|
const-string v4, "yum"
|
|
|
|
const-string v5, "weary"
|
|
|
|
const-string v6, "tired_face"
|
|
|
|
const-string v7, "poop"
|
|
|
|
const-string v8, "thumbsup"
|
|
|
|
const-string v9, "100"
|
|
|
|
filled-new-array/range {v2 .. v9}, [Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreEmoji;->DEFAULT_FREQUENT_EMOJIS:[Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreEmojiCustom;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreGuildsSorted;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreEmoji;->customEmojiStore:Lcom/discord/stores/StoreEmojiCustom;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreEmoji;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreEmoji;->permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreEmoji;->sortedGuildsStore:Lcom/discord/stores/StoreGuildsSorted;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
invoke-direct {p2}, Lcom/discord/utilities/emoji/EmojiFrecencyTracker;-><init>()V
|
|
|
|
const-string p3, "EMOJI_HISTORY_V3"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreEmoji;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreEmoji;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreEmoji;->frecency:Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "sortedGuildsStore"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "permissionsStore"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "userStore"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "customEmojiStore"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$buildUsableEmojiSet(Lcom/discord/stores/StoreEmoji;Ljava/util/Map;Lcom/discord/stores/StoreEmoji$EmojiContext;Ljava/util/List;ZZZZ)Lcom/discord/models/domain/emoji/EmojiSet;
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p7}, Lcom/discord/stores/StoreEmoji;->buildUsableEmojiSet(Ljava/util/Map;Lcom/discord/stores/StoreEmoji$EmojiContext;Ljava/util/List;ZZZZ)Lcom/discord/models/domain/emoji/EmojiSet;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getCustomEmojiStore$p(Lcom/discord/stores/StoreEmoji;)Lcom/discord/stores/StoreEmojiCustom;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreEmoji;->customEmojiStore:Lcom/discord/stores/StoreEmojiCustom;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDEFAULT_FREQUENT_EMOJIS$cp()[Ljava/lang/String;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreEmoji;->DEFAULT_FREQUENT_EMOJIS:[Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final buildUsableEmojiSet(Ljava/util/Map;Lcom/discord/stores/StoreEmoji$EmojiContext;Ljava/util/List;ZZZZ)Lcom/discord/models/domain/emoji/EmojiSet;
|
|
.locals 18
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/emoji/ModelEmojiCustom;",
|
|
">;>;",
|
|
"Lcom/discord/stores/StoreEmoji$EmojiContext;",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;ZZZZ)",
|
|
"Lcom/discord/models/domain/emoji/EmojiSet;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v11, p2
|
|
|
|
new-instance v12, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v12}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v13, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v13}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v14, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v14}, Ljava/util/HashMap;-><init>()V
|
|
|
|
instance-of v2, v11, Lcom/discord/stores/StoreEmoji$EmojiContext$GuildProfile;
|
|
|
|
const-string v15, "unicodeEmojis"
|
|
|
|
const/16 v16, 0x0
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreEmoji;->unicodeEmojis:Ljava/util/Map;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
invoke-interface {v4}, Lcom/discord/models/domain/emoji/Emoji;->getUniqueId()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "emoji.uniqueId"
|
|
|
|
invoke-static {v5, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v14, v5, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-static {v15}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v16
|
|
|
|
:cond_2
|
|
sget-object v2, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$2;->INSTANCE:Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$2;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$3;
|
|
|
|
move-object v2, v10
|
|
|
|
move-object/from16 v3, p2
|
|
|
|
move/from16 v4, p7
|
|
|
|
move/from16 v5, p6
|
|
|
|
move/from16 v6, p4
|
|
|
|
move/from16 v7, p5
|
|
|
|
move-object v8, v12
|
|
|
|
move-object v9, v14
|
|
|
|
move-object/from16 v17, v15
|
|
|
|
move-object v15, v10
|
|
|
|
move-object v10, v13
|
|
|
|
invoke-direct/range {v2 .. v10}, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$3;-><init>(Lcom/discord/stores/StoreEmoji$EmojiContext;ZZZZLjava/util/HashMap;Ljava/util/HashMap;Ljava/util/Map;)V
|
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisNamesMap:Ljava/util/Map;
|
|
|
|
if-eqz v2, :cond_d
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_1
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
sget-object v4, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$2;->INSTANCE:Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$2;
|
|
|
|
invoke-virtual {v4, v12, v3}, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$2;->invoke(Ljava/util/Map;Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
instance-of v2, v11, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
move-object v2, v11
|
|
|
|
check-cast v2, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const-wide/16 v2, 0x0
|
|
|
|
:goto_2
|
|
invoke-virtual {v15, v1, v2, v3}, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$3;->invoke(Ljava/util/Map;J)V
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface/range {p3 .. p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v5
|
|
|
|
:cond_5
|
|
:goto_3
|
|
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
const/4 v7, 0x1
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v8, v6
|
|
|
|
check-cast v8, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v8}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v8
|
|
|
|
cmp-long v10, v8, v2
|
|
|
|
if-eqz v10, :cond_6
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
const/4 v7, 0x0
|
|
|
|
:goto_4
|
|
if-eqz v7, :cond_5
|
|
|
|
invoke-interface {v4, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
invoke-interface {v4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_5
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_8
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v15, v1, v3, v4}, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$3;->invoke(Ljava/util/Map;J)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
invoke-interface/range {p1 .. p1}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_9
|
|
:goto_6
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_a
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v5, v4
|
|
|
|
check-cast v5, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
move-object/from16 v6, p3
|
|
|
|
invoke-interface {v6, v5}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
xor-int/2addr v5, v7
|
|
|
|
if-eqz v5, :cond_9
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_7
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v15, v1, v3, v4}, Lcom/discord/stores/StoreEmoji$buildUsableEmojiSet$3;->invoke(Ljava/util/Map;J)V
|
|
|
|
goto :goto_7
|
|
|
|
:cond_b
|
|
new-instance v1, Lcom/discord/models/domain/emoji/EmojiSet;
|
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreEmoji;->unicodeEmojis:Ljava/util/Map;
|
|
|
|
if-eqz v2, :cond_c
|
|
|
|
invoke-direct {v0, v14}, Lcom/discord/stores/StoreEmoji;->getFrequentlyUsedEmojis(Ljava/util/Map;)Ljava/util/List;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v1, v2, v13, v14, v3}, Lcom/discord/models/domain/emoji/EmojiSet;-><init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_c
|
|
invoke-static/range {v17 .. v17}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v16
|
|
|
|
:cond_d
|
|
const-string v1, "unicodeEmojisNamesMap"
|
|
|
|
invoke-static {v1}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v16
|
|
.end method
|
|
|
|
.method private final compileSurrogatesPattern()Ljava/util/regex/Pattern;
|
|
.locals 10
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojiSurrogateMap:Ljava/util/Map;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreEmoji$compileSurrogatesPattern$$inlined$sortedBy$1;
|
|
|
|
invoke-direct {v1}, Lcom/discord/stores/StoreEmoji$compileSurrogatesPattern$$inlined$sortedBy$1;-><init>()V
|
|
|
|
invoke-static {v0, v1}, Lx/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
sget-object v8, Lcom/discord/stores/StoreEmoji$compileSurrogatesPattern$emojiSurrogatesPattern$2;->INSTANCE:Lcom/discord/stores/StoreEmoji$compileSurrogatesPattern$emojiSurrogatesPattern$2;
|
|
|
|
const/16 v9, 0x1e
|
|
|
|
const-string v3, "|"
|
|
|
|
invoke-static/range {v2 .. v9}, Lx/q/l;->joinToString$default(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Pattern.compile(emojiSurrogatesPattern)"
|
|
|
|
invoke-static {v0, v1}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v0, "unicodeEmojiSurrogateMap"
|
|
|
|
invoke-static {v0}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static synthetic getEmojiSet$default(Lcom/discord/stores/StoreEmoji;JJZZILjava/lang/Object;)Lrx/Observable;
|
|
.locals 9
|
|
|
|
and-int/lit8 v0, p7, 0x4
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v7, p5
|
|
|
|
:goto_0
|
|
and-int/lit8 v0, p7, 0x8
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v8, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move v8, p6
|
|
|
|
:goto_1
|
|
move-object v2, p0
|
|
|
|
move-wide v3, p1
|
|
|
|
move-wide v5, p3
|
|
|
|
invoke-virtual/range {v2 .. v8}, Lcom/discord/stores/StoreEmoji;->getEmojiSet(JJZZ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic getEmojiSet$default(Lcom/discord/stores/StoreEmoji;Lcom/discord/stores/StoreEmoji$EmojiContext;ZZILjava/lang/Object;)Lrx/Observable;
|
|
.locals 1
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/stores/StoreEmoji;->getEmojiSet(Lcom/discord/stores/StoreEmoji$EmojiContext;ZZ)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getFrequentlyUsedEmojis(Ljava/util/Map;)Ljava/util/List;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Lcom/discord/models/domain/emoji/Emoji;",
|
|
">;)",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/emoji/Emoji;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->frecency:Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
invoke-static {v0, v3, v4, v1, v2}, Lcom/discord/utilities/frecency/FrecencyTracker;->getSortedKeys$default(Lcom/discord/utilities/frecency/FrecencyTracker;JILjava/lang/Object;)Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
invoke-interface {p1, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/16 p1, 0x28
|
|
|
|
invoke-static {v3, p1}, Lx/q/l;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-lt v3, p1, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
sget-object v3, Lcom/discord/stores/StoreEmoji;->DEFAULT_FREQUENT_EMOJIS:[Ljava/lang/String;
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
array-length v5, v3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:goto_1
|
|
if-ge v7, v5, :cond_5
|
|
|
|
aget-object v8, v3, v7
|
|
|
|
iget-object v9, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisNamesMap:Ljava/util/Map;
|
|
|
|
if-eqz v9, :cond_4
|
|
|
|
invoke-interface {v9, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v8
|
|
|
|
check-cast v8, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;
|
|
|
|
if-eqz v8, :cond_3
|
|
|
|
invoke-interface {v4, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_3
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
const-string p1, "unicodeEmojisNamesMap"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_5
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
sub-int/2addr p1, v3
|
|
|
|
invoke-static {v4, p1}, Lx/q/l;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v3, 0x2
|
|
|
|
new-array v3, v3, [Ljava/util/List;
|
|
|
|
aput-object v0, v3, v6
|
|
|
|
aput-object p1, v3, v1
|
|
|
|
invoke-static {v3}, Le/n/a/j/a;->sequenceOf([Ljava/lang/Object;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
sget-object v0, Lx/z/j;->d:Lx/z/j;
|
|
|
|
invoke-static {p1, v0}, Le/n/a/j/a;->a(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Le/n/a/j/a;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lx/q/l;->distinct(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_2
|
|
return-object v0
|
|
|
|
:cond_6
|
|
const-string p1, "$this$flatten"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
.end method
|
|
|
|
.method private final handleLoadedUnicodeEmojis(Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;)V
|
|
.locals 8
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v3, Lcom/discord/stores/StoreEmoji$handleLoadedUnicodeEmojis$1;
|
|
|
|
invoke-direct {v3, v2, v1}, Lcom/discord/stores/StoreEmoji$handleLoadedUnicodeEmojis$1;-><init>(Ljava/util/HashMap;Ljava/util/HashMap;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;->getEmojis()Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v4, "unicodeEmojisBundle.emojis"
|
|
|
|
invoke-static {p1, v4}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v4}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/emoji/EmojiCategory;
|
|
|
|
invoke-interface {v4}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/List;
|
|
|
|
const-string v6, "category"
|
|
|
|
invoke-static {v5, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v6, "categoryEmojis"
|
|
|
|
invoke-static {v4, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v0, v5, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-interface {v4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v4
|
|
|
|
:cond_1
|
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;
|
|
|
|
const-string v6, "unicodeEmoji"
|
|
|
|
invoke-static {v5, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3, v5}, Lcom/discord/stores/StoreEmoji$handleLoadedUnicodeEmojis$1;->invoke(Lcom/discord/models/domain/emoji/ModelEmojiUnicode;)V
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;->getAsDiverse()Ljava/util/List;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "unicodeEmoji\n .asDiverse"
|
|
|
|
invoke-static {v5, v6}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v5}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v5
|
|
|
|
:goto_0
|
|
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;
|
|
|
|
const-string v7, "diverseEmoji"
|
|
|
|
invoke-static {v6, v7}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3, v6}, Lcom/discord/stores/StoreEmoji$handleLoadedUnicodeEmojis$1;->invoke(Lcom/discord/models/domain/emoji/ModelEmojiUnicode;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iput-object v0, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojis:Ljava/util/Map;
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisNamesMap:Ljava/util/Map;
|
|
|
|
iput-object v2, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojiSurrogateMap:Ljava/util/Map;
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreEmoji;->compileSurrogatesPattern()Ljava/util/regex/Pattern;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisPattern:Ljava/util/regex/Pattern;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final loadUnicodeEmojisFromDisk(Landroid/content/Context;)Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/io/InputStreamReader;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "data/emojis.json"
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "UTF-8"
|
|
|
|
invoke-direct {v0, p1, v1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V
|
|
|
|
new-instance p1, Lcom/discord/models/domain/Model$JsonReader;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/models/domain/Model$JsonReader;-><init>(Ljava/io/Reader;)V
|
|
|
|
new-instance v0, Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;
|
|
|
|
invoke-direct {v0}, Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;-><init>()V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/models/domain/Model$JsonReader;->parse(Lcom/discord/models/domain/Model;)Lcom/discord/models/domain/Model;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "jsonReader.parse(ModelEmojiUnicode.Bundle())"
|
|
|
|
invoke-static {p1, v0}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getCustomEmoji(J)Lcom/discord/models/domain/emoji/ModelEmojiCustom;
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->customEmojiStore:Lcom/discord/stores/StoreEmojiCustom;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreEmojiCustom;->getAllGuildEmojis$app_productionDiscordExternalRelease()Ljava/util/HashMap;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/emoji/ModelEmojiCustom;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getEmojiSet(JJZZ)Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJZZ)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/emoji/EmojiSet;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;
|
|
|
|
invoke-direct {v0, p1, p2, p3, p4}, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;-><init>(JJ)V
|
|
|
|
invoke-virtual {p0, v0, p5, p6}, Lcom/discord/stores/StoreEmoji;->getEmojiSet(Lcom/discord/stores/StoreEmoji$EmojiContext;ZZ)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getEmojiSet(Lcom/discord/stores/StoreEmoji$EmojiContext;ZZ)Lrx/Observable;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreEmoji$EmojiContext;",
|
|
"ZZ)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/emoji/EmojiSet;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
instance-of v0, p1, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;->getGuildId()J
|
|
|
|
move-result-wide v1
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
cmp-long v5, v1, v3
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreEmoji;->permissionsStore:Lcom/discord/stores/StorePermissions;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreEmoji$EmojiContext$Chat;->getChannelId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/stores/StorePermissions;->getForChannel(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreEmoji$getEmojiSet$hasExternalEmojiPermissionObservable$1;->INSTANCE:Lcom/discord/stores/StoreEmoji$getEmojiSet$hasExternalEmojiPermissionObservable$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lf0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lf0/m/e/j;
|
|
|
|
invoke-direct {v1, v0}, Lf0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/discord/stores/StoreEmoji;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreEmoji$getEmojiSet$1;->INSTANCE:Lcom/discord/stores/StoreEmoji$getEmojiSet$1;
|
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->f(Lf0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreEmoji;->sortedGuildsStore:Lcom/discord/stores/StoreGuildsSorted;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreGuildsSorted;->getFlat()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreEmoji$getEmojiSet$2;->INSTANCE:Lcom/discord/stores/StoreEmoji$getEmojiSet$2;
|
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->f(Lf0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreEmoji$getEmojiSet$3;->INSTANCE:Lcom/discord/stores/StoreEmoji$getEmojiSet$3;
|
|
|
|
invoke-static {v1, v0, v2, v3}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func3;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreEmoji$getEmojiSet$4;
|
|
|
|
invoke-direct {v1, p0, p1, p3, p2}, Lcom/discord/stores/StoreEmoji$getEmojiSet$4;-><init>(Lcom/discord/stores/StoreEmoji;Lcom/discord/stores/StoreEmoji$EmojiContext;ZZ)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lf0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "Observable\n .comb\u2026 }\n }"
|
|
|
|
invoke-static {p1, p2}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string p1, "emojiContext"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public getUnicodeEmojiSurrogateMap()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/models/domain/emoji/ModelEmojiUnicode;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojiSurrogateMap:Ljava/util/Map;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v0, "unicodeEmojiSurrogateMap"
|
|
|
|
invoke-static {v0}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public getUnicodeEmojisNamesMap()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/models/domain/emoji/ModelEmojiUnicode;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisNamesMap:Ljava/util/Map;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v0, "unicodeEmojisNamesMap"
|
|
|
|
invoke-static {v0}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public getUnicodeEmojisPattern()Ljava/util/regex/Pattern;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreEmoji;->unicodeEmojisPattern:Ljava/util/regex/Pattern;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v0, "unicodeEmojisPattern"
|
|
|
|
invoke-static {v0}, Lx/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final initBlocking(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreEmoji;->loadUnicodeEmojisFromDisk(Landroid/content/Context;)Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreEmoji;->handleLoadedUnicodeEmojis(Lcom/discord/models/domain/emoji/ModelEmojiUnicode$Bundle;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final onEmojiUsed(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1}, Lcom/discord/models/domain/emoji/Emoji;->getUniqueId()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "emoji.uniqueId"
|
|
|
|
invoke-static {p1, v0}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreEmoji;->onEmojiUsed(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "emoji"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final onEmojiUsed(Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreEmoji;->frecency:Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/frecency/FrecencyTracker;->track$default(Lcom/discord/utilities/frecency/FrecencyTracker;Ljava/lang/Object;JILjava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreEmoji;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreEmoji;->frecency:Lcom/discord/utilities/emoji/EmojiFrecencyTracker;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {p1, v1, v2, v3, v0}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "emojiKey"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|