2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreMessageReactions;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreMessageReactions.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
.field public isDirty:Z
|
|
|
|
|
|
|
|
.field public final reactions:Ljava/util/Map;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lcom/discord/stores/StoreMessageReactions$EmojiResults;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final reactionsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lcom/discord/stores/StoreMessageReactions$EmojiResults;",
|
|
|
|
">;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUser;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageReactions;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMessageReactions;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
sget-object p1, Lj0/j/o;->d:Lj0/j/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->g0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageReactions;->reactionsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "userStore"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "dispatcher"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$fetchReactions(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreMessageReactions;->fetchReactions(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreMessageReactions;)Lcom/discord/stores/Dispatcher;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMessageReactions;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getReactions$p(Lcom/discord/stores/StoreMessageReactions;)Ljava/util/Map;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleLoadReactionUsersFailure(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreMessageReactions;->handleLoadReactionUsersFailure(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleReactionUsers(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;Ljava/util/List;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p6}, Lcom/discord/stores/StoreMessageReactions;->handleReactionUsers(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$isDirty$p(Lcom/discord/stores/StoreMessageReactions;)Z
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setDirty$p(Lcom/discord/stores/StoreMessageReactions;Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0, p3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Loading;->INSTANCE:Lcom/discord/stores/StoreMessageReactions$EmojiResults$Loading;
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v0, p3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p3, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final fetchReactions(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
.locals 16
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
move-object/from16 v7, p0
|
|
|
|
|
|
|
|
invoke-virtual/range {p5 .. p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "emoji.key"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-wide/from16 v4, p3
|
|
|
|
|
|
|
|
invoke-direct {v7, v4, v5, v0}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v2, v0, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;->getUsers()Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
xor-int/2addr v0, v3
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object/from16 v15, p5
|
|
|
|
|
|
|
|
invoke-direct {v7, v15}, Lcom/discord/stores/StoreMessageReactions;->getReactionEmojiRequestParam(Lcom/discord/models/domain/ModelMessageReaction$Emoji;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v13
|
|
|
|
|
|
|
|
iget-object v0, v7, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual/range {p5 .. p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v2, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Loading;->INSTANCE:Lcom/discord/stores/StoreMessageReactions$EmojiResults$Loading;
|
|
|
|
|
|
|
|
invoke-interface {v0, v2, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
const/16 v0, 0x64
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v14
|
|
|
|
|
|
|
|
move-wide/from16 v9, p1
|
|
|
|
|
|
|
|
move-wide/from16 v11, p3
|
|
|
|
|
|
|
|
invoke-virtual/range {v8 .. v14}, Lcom/discord/utilities/rest/RestAPI;->getReactionUsers(JJLjava/lang/String;Ljava/lang/Integer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-static {v0, v1, v3, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/stores/StoreMessageReactions$fetchReactions$1;
|
|
|
|
|
|
|
|
move-object v0, v9
|
|
|
|
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
|
|
|
|
move-wide/from16 v2, p1
|
|
|
|
|
|
|
|
move-wide/from16 v4, p3
|
|
|
|
|
|
|
|
move-object/from16 v6, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/stores/StoreMessageReactions$fetchReactions$1;-><init>(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreMessageReactions$fetchReactions$2;
|
|
|
|
|
|
|
|
move-object v0, v10
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/stores/StoreMessageReactions$fetchReactions$2;-><init>(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {v8, v9, v10}, Lrx/Observable;->R(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getReactionEmojiRequestParam(Lcom/discord/models/domain/ModelMessageReaction$Emoji;)Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->isCustom()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const/16 v1, 0x3a
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "emoji.name"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1, v0}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleLoadReactionUsersFailure(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
.locals 9
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "emoji.key"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p3, p4, v0}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v2, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Failure;
|
|
|
|
|
|
|
|
move-object v3, v1
|
|
|
|
|
|
|
|
move-wide v4, p1
|
|
|
|
|
|
|
|
move-wide v6, p3
|
|
|
|
|
|
|
|
move-object v8, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Failure;-><init>(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
invoke-interface {v0, v2, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleReactionUsers(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;Ljava/util/List;)V
|
|
|
|
.locals 9
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(JJ",
|
|
|
|
"Lcom/discord/models/domain/ModelMessageReaction$Emoji;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "emoji.key"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p3, p4, v0}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v3}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p6}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p6
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p6}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p6}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v2, v0
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v3, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object p6, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {p6, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p6
|
|
|
|
|
|
|
|
check-cast p6, Ljava/util/Map;
|
|
|
|
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p5}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
move-object v2, v1
|
|
|
|
|
|
|
|
move-wide v4, p1
|
|
|
|
|
|
|
|
move-wide v6, p3
|
|
|
|
|
|
|
|
move-object v8, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v2 .. v8}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;-><init>(Ljava/util/LinkedHashMap;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
invoke-interface {p6, v0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final deleteEmoji(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;J)V
|
|
|
|
.locals 11
|
|
|
|
|
|
|
|
move-object/from16 v0, p5
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreMessageReactions;->getReactionEmojiRequestParam(Lcom/discord/models/domain/ModelMessageReaction$Emoji;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
move-wide v4, p1
|
|
|
|
|
|
|
|
move-wide v6, p3
|
|
|
|
|
|
|
|
move-wide/from16 v9, p6
|
|
|
|
|
|
|
|
invoke-virtual/range {v3 .. v10}, Lcom/discord/utilities/rest/RestAPI;->removeReaction(JJLjava/lang/String;J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v3, v4, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMessageReactions$deleteEmoji$1;->INSTANCE:Lcom/discord/stores/StoreMessageReactions$deleteEmoji$1;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreMessageReactions$deleteEmoji$2;->INSTANCE:Lcom/discord/stores/StoreMessageReactions$deleteEmoji$2;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {v0, v1, v3}, Lrx/Observable;->R(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
const-string v0, "emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v0}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final forceRetryFetchReactions(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
.locals 9
|
|
|
|
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v8, Lcom/discord/stores/StoreMessageReactions$forceRetryFetchReactions$1;
|
|
|
|
|
|
|
|
move-object v1, v8
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
move-wide v3, p3
|
|
|
|
|
|
|
|
move-object v5, p5
|
|
|
|
|
|
|
|
move-wide v6, p1
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/discord/stores/StoreMessageReactions$forceRetryFetchReactions$1;-><init>(Lcom/discord/stores/StoreMessageReactions;JLcom/discord/models/domain/ModelMessageReaction$Emoji;J)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v8}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getMessageReactions(JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)Lrx/Observable;
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(JJ",
|
|
|
|
"Lcom/discord/models/domain/ModelMessageReaction$Emoji;",
|
|
|
|
")",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/stores/StoreMessageReactions$EmojiResults;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v8, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$1;
|
|
|
|
|
|
|
|
move-object v1, v8
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
move-wide v3, p1
|
|
|
|
|
|
|
|
move-wide v5, p3
|
|
|
|
|
|
|
|
move-object v7, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$1;-><init>(Lcom/discord/stores/StoreMessageReactions;JJLcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v8}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMessageReactions;->reactionsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$2;
|
|
|
|
|
|
|
|
invoke-direct {p2, p3, p4}, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$2;-><init>(J)V
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->D(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$3;
|
|
|
|
|
|
|
|
invoke-direct {p2, p5}, Lcom/discord/stores/StoreMessageReactions$getMessageReactions$3;-><init>(Lcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->D(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "reactionsSubject\n \u2026?: EmojiResults.Loading }"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleConnectionOpen()V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
xor-int/2addr v0, v1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->clear()V
|
|
|
|
|
|
|
|
iput-boolean v1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleReactionAdd(Lcom/discord/models/domain/ModelMessageReaction$Update;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageReactions;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUser;->getUsersInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getUserId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, 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/ModelUser;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "update.emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v4, v5}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "update.emoji.key"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v4, v5}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v2, v3, v4}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
instance-of v3, v2, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;->getUsers()Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getUserId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "update"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleReactionRemove(Lcom/discord/models/domain/ModelMessageReaction$Update;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v4, "update.emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v3, v4}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v4, "update.emoji.key"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {v3, v4}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v1, v2, v3}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
instance-of v2, v1, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v0, v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;->getUsers()Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getUserId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "update"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleReactionRemoveAll(Lcom/discord/models/domain/ModelMessageReaction$Update;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "update"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleReactionRemoveEmoji(Lcom/discord/models/domain/ModelMessageReaction$Update;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Update;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v2, "update.emoji"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1, v2}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v2, "emojiKey"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1, v2}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/stores/StoreMessageReactions;->ensureReactionResults(JLjava/lang/String;)Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "update"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 7
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageReactions;->reactions:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()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-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
|
|
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v5, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v0, v2, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-interface {v5}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
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/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreMessageReactions$EmojiResults;
|
|
|
|
|
|
|
|
instance-of v6, v3, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;->deepCopy()Lcom/discord/stores/StoreMessageReactions$EmojiResults$Users;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-interface {v5, v4, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageReactions;->reactionsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreMessageReactions;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|