2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreGameParty;
|
2019-12-21 01:41:59 +00:00
|
|
|
.super Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
.source "StoreGameParty.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final parties:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final partiesSubject:Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final userParties:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 1
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGameParty;->userParties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {}, Ly/q/l;->emptyMap()Ljava/util/Map;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGameParty;->partiesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final addUserToParty(JJLjava/lang/String;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p5, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
cmp-long v2, p3, v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-lez v2, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGameParty;->userParties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
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 v2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-nez v2, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-interface {v2, p3, p5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p3, p5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
check-cast p3, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
new-instance p4, Ljava/util/HashSet;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p3, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p4, p3}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-direct {p4}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p4, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-interface {p1, p5, p4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGameParty;->isDirty:Z
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic handlePresenceUpdate$default(Lcom/discord/stores/StoreGameParty;Lcom/discord/models/domain/ModelPresence;JILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide p2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/stores/StoreGameParty;->handlePresenceUpdate(Lcom/discord/models/domain/ModelPresence;J)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handlePresences(Ljava/util/List;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/discord/stores/StoreGameParty;->updateParty(Lcom/discord/models/domain/ModelPresence;J)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final removeUserFromParty(JJ)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGameParty;->userParties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/HashMap;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v0, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {v0, p3}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
check-cast p3, Ljava/lang/String;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p3, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string p4, "userParties[userId]?.remove(guildId) ?: return"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p3, p4}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object p4, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p4, p3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
check-cast p4, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p4, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p4}, Ljava/util/HashSet;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eq v1, v0, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v2, p4}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-interface {v1, p3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p3}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
:goto_0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreGameParty;->isDirty:Z
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final updateParty(Lcom/discord/models/domain/ModelPresence;J)V
|
2019-12-21 01:41:59 +00:00
|
|
|
.locals 9
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz v0, :cond_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGameParty;->userParties:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-20 07:00:35 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-wide v2
|
2019-12-20 07:00:35 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v2
|
2019-12-20 07:00:35 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-virtual {v1, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
check-cast v1, Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
const/4 v2, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-12-20 07:00:35 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-virtual {v1, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
check-cast v1, Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
goto :goto_0
|
2019-12-20 07:00:35 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:cond_0
|
|
|
|
move-object v1, v2
|
2019-12-20 07:00:35 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:goto_0
|
2020-01-07 02:40:43 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getPlayingActivity()Lcom/discord/models/domain/activity/ModelActivity;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz v3, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-07 02:40:43 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/activity/ModelActivity;->getParty()Lcom/discord/models/domain/activity/ModelActivityParty;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz v3, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-07 02:40:43 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/activity/ModelActivityParty;->getId()Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:cond_1
|
|
|
|
move-object v8, v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
const/4 v2, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz v8, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelPresence$Status;->OFFLINE:Lcom/discord/models/domain/ModelPresence$Status;
|
|
|
|
|
|
|
|
if-eq p1, v3, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
goto :goto_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:goto_1
|
|
|
|
if-eqz p1, :cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {v1, v8}, Ly/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
xor-int/2addr p1, v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
if-eqz p1, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-wide v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-direct {p0, v1, v2, p2, p3}, Lcom/discord/stores/StoreGameParty;->removeUserFromParty(JJ)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-wide v4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-object v3, p0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-wide v6, p2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/stores/StoreGameParty;->addUserToParty(JJLjava/lang/String;)V
|
2019-12-18 09:41:56 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
move-result-wide v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-direct {p0, v0, v1, p2, p3}, Lcom/discord/stores/StoreGameParty;->removeUserFromParty(JJ)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
:cond_5
|
|
|
|
:goto_2
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getUsersForPartyId(Ljava/lang/String;)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
")",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGameParty;->partiesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGameParty$getUsersForPartyId$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/stores/StoreGameParty$getUsersForPartyId$1;-><init>(Ljava/lang/String;)V
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreGameParty$getUsersForPartyId$2;->INSTANCE:Lcom/discord/stores/StoreGameParty$getUsersForPartyId$2;
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lg0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-14 23:59:34 +00:00
|
|
|
const-string v0, "partiesSubject\n .\u2026toSortedMap() }\n }"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1, v0}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-08-14 23:59:34 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-14 23:59:34 +00:00
|
|
|
const-string v0, "partiesSubject\n .\u2026 .distinctUntilChanged()"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1, v0}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
2019-12-21 01:41:59 +00:00
|
|
|
.locals 1
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getPresences()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreGameParty;->handlePresences(Ljava/util/List;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "payload.guilds"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1, v0}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/stores/StoreGameParty;->handleGuildCreateOrSync(Lcom/discord/models/domain/ModelGuild;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "payload"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildCreateOrSync(Lcom/discord/models/domain/ModelGuild;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 0
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getPresences()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreGameParty;->handlePresences(Ljava/util/List;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "guild"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handlePresenceReplace(Ljava/util/List;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 0
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreGameParty;->handlePresences(Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "presences"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handlePresenceUpdate(Lcom/discord/models/domain/ModelPresence;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreGameParty;->handlePresenceUpdate$default(Lcom/discord/stores/StoreGameParty;Lcom/discord/models/domain/ModelPresence;JILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handlePresenceUpdate(Lcom/discord/models/domain/ModelPresence;J)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 0
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreGameParty;->updateParty(Lcom/discord/models/domain/ModelPresence;J)V
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "presence"
|
|
|
|
|
2020-03-26 05:26:27 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public onDispatchEnded()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreGameParty;->isDirty:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGameParty;->partiesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGameParty;->parties:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreGameParty;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|