2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreUserPresence;
|
2020-10-19 23:59:54 +00:00
|
|
|
.super Lcom/discord/stores/StoreV2;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "StoreUserPresence.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
2020-10-19 23:59:54 +00:00
|
|
|
Lcom/discord/stores/StoreUserPresence$TimestampedPresence;,
|
|
|
|
Lcom/discord/stores/StoreUserPresence$Companion;
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/stores/StoreUserPresence$Companion;
|
|
|
|
|
|
|
|
.field public static final LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
# instance fields
|
|
|
|
.field public final clock:Lcom/discord/utilities/time/Clock;
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.field public localPresenceSnapshot:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
.field public meUser:Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.field public final observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.field public presencesSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-10-17 00:53:08 +00:00
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
2020-10-19 23:59:54 +00:00
|
|
|
">;"
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
.field public final userGuildPresences:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/stores/StoreUserPresence$TimestampedPresence;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreUserPresence$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreUserPresence$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreUserPresence;->Companion:Lcom/discord/stores/StoreUserPresence$Companion;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lcom/discord/utilities/time/Clock;Lcom/discord/stores/StoreStream;Lcom/discord/stores/updates/ObservationDeck;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "clock"
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-09 19:21:20 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-string/jumbo v0, "stream"
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p2, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-string v0, "observationDeck"
|
|
|
|
|
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreV2;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreUserPresence;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreUserPresence;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
new-instance p1, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 p3, 0x1
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-direct {p1, p2, p3, v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;-><init>(IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-instance p1, Ljava/util/HashMap;
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->presencesSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/models/domain/ModelPresence$Status;->ONLINE:Lcom/discord/models/domain/ModelPresence$Status;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/16 v8, 0x3c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v9, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v0, p1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct/range {v0 .. v9}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/16 v8, 0x3f
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static/range {v0 .. v9}, Lcom/discord/models/domain/ModelPresence;->copy$default(Lcom/discord/models/domain/ModelPresence;Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILjava/lang/Object;)Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->localPresenceSnapshot:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getLocalPresenceSnapshot$p(Lcom/discord/stores/StoreUserPresence;)Lcom/discord/models/domain/ModelPresence;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserPresence;->localPresenceSnapshot:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getPresencesSnapshot$p(Lcom/discord/stores/StoreUserPresence;)Ljava/util/Map;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserPresence;->presencesSnapshot:Ljava/util/Map;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setLocalPresenceSnapshot$p(Lcom/discord/stores/StoreUserPresence;Lcom/discord/models/domain/ModelPresence;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->localPresenceSnapshot:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setPresencesSnapshot$p(Lcom/discord/stores/StoreUserPresence;Ljava/util/Map;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->presencesSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final clearPresences(J)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
|
|
|
|
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
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {v0}, 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;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-interface {v1}, 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
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Number;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreUserPresence;->flattenPresence(J)V
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final flattenPresence(J)V
|
2020-10-19 23:59:54 +00:00
|
|
|
.locals 13
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v0, Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v1, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2020-08-07 20:54:39 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-08-08 02:55:33 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v2
|
2020-08-10 23:03:03 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-nez v2, :cond_0
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v2, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-nez v3, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v3, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v3, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;->getTimestamp()J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-wide v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_2
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v6, v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v6, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;->getTimestamp()J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-wide v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
cmp-long v8, v3, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-gez v8, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v2, v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-wide v3, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_3
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-nez v5, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v2, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v2, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;->getPresence()Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v0, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v2, :cond_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelPresence$Status;->OFFLINE:Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_2
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v4, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v2, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v3, Lcom/discord/utilities/presence/PresenceUtils;->INSTANCE:Lcom/discord/utilities/presence/PresenceUtils;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/utilities/presence/PresenceUtils;->getACTIVITY_COMPARATOR$app_productionDiscordExternalRelease()Ljava/util/Comparator;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {v2, v3}, Lc0/i/f;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {v2}, Lc0/i/f;->reversed(Ljava/lang/Iterable;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v5, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_6
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v5, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_3
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getClientStatuses()Lcom/discord/models/domain/ModelPresence$ClientStatuses;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_7
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v0, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_4
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelPresence$Status;->OFFLINE:Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-ne v4, v2, :cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object p1
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz p1, :cond_c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_8
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v2, v3}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v2, :cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_9
|
2020-10-19 23:59:54 +00:00
|
|
|
if-ne v1, v4, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {v1, v5}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
xor-int/lit8 v1, v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-nez v1, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getClientStatuses()Lcom/discord/models/domain/ModelPresence$ClientStatuses;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {v1, v0}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
xor-int/lit8 v1, v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v1, :cond_c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_a
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-instance p2, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v0, :cond_b
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_b
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v0, Lcom/discord/models/domain/ModelPresence$ClientStatuses;->Companion:Lcom/discord/models/domain/ModelPresence$ClientStatuses$Companion;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence$ClientStatuses$Companion;->empty()Lcom/discord/models/domain/ModelPresence$ClientStatuses;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_5
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v6, v0
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v7, 0x0
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v8, 0x0
|
2020-10-17 00:53:08 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-wide/16 v9, 0x0
|
2020-08-08 02:55:33 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/16 v11, 0x38
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v12, 0x0
|
2020-08-10 23:03:03 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v3, p2
|
2020-08-10 23:03:03 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-direct/range {v3 .. v12}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v1, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_c
|
|
|
|
:goto_6
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getCustomStatusActivityFromSetting(Lcom/discord/models/domain/ModelCustomStatusSetting;)Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/models/domain/ModelCustomStatusSetting;->Companion:Lcom/discord/models/domain/ModelCustomStatusSetting$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelCustomStatusSetting$Companion;->getCLEAR()Lcom/discord/models/domain/ModelCustomStatusSetting;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getExpiresAt()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getExpiresAt()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/time/TimeUtils;->parseUTCDate(Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
|
|
|
|
cmp-long v0, v2, v4
|
|
|
|
|
|
|
|
if-gtz v0, :cond_1
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getEmojiId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v0, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getEmojis$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreEmoji;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getEmojiId()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v2}, Lc0/n/c/j;->checkNotNull(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, v3}, Lcom/discord/stores/StoreEmoji;->getCustomEmoji(J)Lcom/discord/models/domain/emoji/ModelEmojiCustom;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/models/domain/ModelMessageReaction$Emoji;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->isAnimated()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-direct {v1, v2, v3, v0}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;-><init>(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getEmojiName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getEmojis$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreEmoji;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreEmoji;->getUnicodeEmojiSurrogateMap()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getEmojiName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v2}, Lc0/n/c/j;->checkNotNull(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/models/domain/ModelMessageReaction$Emoji;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/emoji/ModelEmojiUnicode;->getSurrogates()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v2, v1, v0, v3}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;-><init>(Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
move-object v1, v2
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
:cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelCustomStatusSetting;->getText()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1, v1}, Lcom/discord/models/domain/activity/ModelActivity;->createForCustom(Ljava/lang/String;Lcom/discord/models/domain/ModelMessageReaction$Emoji;)Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final removeActivityInList(ILjava/util/List;)Ljava/util/List;
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(I",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
">;)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p2}, Lc0/i/f;->toMutableList(Ljava/util/Collection;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/activity/ModelActivity;->getType()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-ne v4, p1, :cond_1
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 v3, -0x1
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
if-eq v3, v1, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final replaceActivityInList(Lcom/discord/models/domain/activity/ModelActivity;Ljava/util/List;)Ljava/util/List;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
">;)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/activity/ModelActivity;->getType()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, p2}, Lcom/discord/stores/StoreUserPresence;->removeActivityInList(ILjava/util/List;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
return-object p2
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic updateActivity$default(Lcom/discord/stores/StoreUserPresence;ILcom/discord/models/domain/activity/ModelActivity;ZILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/stores/StoreUserPresence;->updateActivity(ILcom/discord/models/domain/activity/ModelActivity;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final updateSelfPresence(Lcom/discord/models/domain/ModelUserSettings;Ljava/util/List;Z)V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 16
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/domain/ModelUserSettings;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelSession;",
|
|
|
|
">;Z)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object/from16 v0, p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreUserPresence;->meUser:Lcom/discord/models/domain/ModelUser;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v1, :cond_a
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUserSettings;->getPresenceStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v3, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v3, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string/jumbo v4, "userSettings?.presenceSt\u2026 ?: localPresence.status"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v3, v4}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface/range {p2 .. p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v6, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v7, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
check-cast v7, Lcom/discord/models/domain/ModelSession;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v7}, Lcom/discord/models/domain/ModelSession;->isActive()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v7, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v6, v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-09-02 04:07:20 +00:00
|
|
|
check-cast v6, Lcom/discord/models/domain/ModelSession;
|
2020-08-07 20:54:39 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v6, :cond_3
|
2020-08-08 02:55:33 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelSession;->getActivities()Ljava/util/List;
|
2020-08-10 23:03:03 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v5
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v5, :cond_3
|
|
|
|
|
|
|
|
move-object v1, v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v5, v0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v5, v1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v1, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v1, v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUserSettings;->getCustomStatus()Lcom/discord/models/domain/ModelCustomStatusSetting;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_5
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v4, :cond_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {v0, v4}, Lcom/discord/stores/StoreUserPresence;->getCustomStatusActivityFromSetting(Lcom/discord/models/domain/ModelCustomStatusSetting;)Lcom/discord/models/domain/activity/ModelActivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v2, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v4, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {v0, v2, v4}, Lcom/discord/stores/StoreUserPresence;->replaceActivityInList(Lcom/discord/models/domain/activity/ModelActivity;Ljava/util/List;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_6
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v2, 0x4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v4, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct {v0, v2, v4}, Lcom/discord/stores/StoreUserPresence;->removeActivityInList(ILjava/util/List;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_7
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_3
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v6, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v14, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-ne v3, v2, :cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v6, v2}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
xor-int/2addr v2, v14
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-eqz v2, :cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_8
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance v2, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v8, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v9, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-wide/16 v10, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/16 v12, 0x3c
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v4, v2
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v5, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct/range {v4 .. v13}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iput-object v2, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-array v2, v14, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v5, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
aput-object v5, v2, v4
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/stores/StoreV2;->markChanged([Lcom/discord/stores/updates/ObservationDeck$UpdateSource;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-20 19:28:48 +00:00
|
|
|
:cond_9
|
2020-09-02 04:07:20 +00:00
|
|
|
const-wide v14, 0x7fffffffffffffffL
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance v2, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v8, v0, Lcom/discord/stores/StoreUserPresence;->meUser:Lcom/discord/models/domain/ModelUser;
|
2020-08-07 20:54:39 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v9, 0x0
|
2020-08-08 02:55:33 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-wide/16 v10, 0x0
|
2020-08-10 23:03:03 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/16 v12, 0x34
|
2020-08-20 19:28:48 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v13, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v4, v2
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v5, v3
|
|
|
|
|
|
|
|
move-object v6, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct/range {v4 .. v13}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v0, v14, v15, v2}, Lcom/discord/stores/StoreUserPresence;->handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-nez p3, :cond_a
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelPresence;->getCustomStatusActivity()Lcom/discord/models/domain/activity/ModelActivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
if-nez v1, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object v1, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreV2;->markUnchanged(Lcom/discord/stores/updates/ObservationDeck$UpdateSource;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_a
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final getLocalPresence$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
return-object v0
|
|
|
|
.end method
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final getObservationDeck()Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final getPresences()Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-10-19 23:59:54 +00:00
|
|
|
"()",
|
|
|
|
"Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
2020-05-17 12:40:10 +00:00
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
return-object v0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final getStream()Lcom/discord/stores/StoreStream;
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->stream:Lcom/discord/stores/StoreStream;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
return-object v0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-string v0, "payload"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->clear()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUserPresence;->meUser:Lcom/discord/models/domain/ModelUser;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-10-17 00:53:08 +00:00
|
|
|
|
|
|
|
const-string v1, "payload.guilds"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Lcom/discord/stores/StoreUserPresence;->handleGuildAdd(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getPresences()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "payload.presences"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
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, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
const-wide v2, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
const-string v4, "presence"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v1, v4}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, v2, v3, v1}, Lcom/discord/stores/StoreUserPresence;->handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getUserSettings()Lcom/discord/models/domain/ModelUserSettings;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getSessions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, p1, v1}, Lcom/discord/stores/StoreUserPresence;->updateSelfPresence(Lcom/discord/models/domain/ModelUserSettings;Ljava/util/List;Z)V
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildAdd(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "guild"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getPresences()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
const-string v4, "presence"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v1, v4}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, v2, v3, v1}, Lcom/discord/stores/StoreUserPresence;->handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildMemberRemove(Lcom/discord/models/domain/ModelGuildMember;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 13
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "member"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
new-instance v12, Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelPresence$Status;->OFFLINE:Lcom/discord/models/domain/ModelPresence$Status;
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-wide/16 v8, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/16 v10, 0x34
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v11, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
move-object v2, v12
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-virtual {p0, v0, v1, v12}, Lcom/discord/stores/StoreUserPresence;->handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildRemove(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "guild"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreUserPresence;->clearPresences(J)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handlePresenceReplace(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
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "presencesList"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreUserPresence;->clearPresences(J)V
|
|
|
|
|
|
|
|
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 v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1, v2}, Lcom/discord/stores/StoreUserPresence;->handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handlePresenceUpdate(JLcom/discord/models/domain/ModelPresence;)V
|
|
|
|
.locals 7
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "presence"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelPresence;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
const-wide v4, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
cmp-long v6, p1, v2
|
|
|
|
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-wide p1, v4
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUserPresence;->meUser:Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
cmp-long v6, v2, v0
|
|
|
|
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
|
|
|
|
cmp-long v2, p1, v4
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUserPresence;->userGuildPresences:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
|
|
|
|
new-instance v4, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v4}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v2, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
check-cast v4, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUserPresence;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
|
|
|
|
invoke-interface {v2}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-direct {p2, p3, v2, v3}, Lcom/discord/stores/StoreUserPresence$TimestampedPresence;-><init>(Lcom/discord/models/domain/ModelPresence;J)V
|
|
|
|
|
|
|
|
invoke-interface {v4, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreUserPresence;->flattenPresence(J)V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleSessionsReplace(Ljava/util/List;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelSession;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "sessions"
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, p1, v1}, Lcom/discord/stores/StoreUserPresence;->updateSelfPresence(Lcom/discord/models/domain/ModelUserSettings;Ljava/util/List;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleUserSettingsUpdate(Lcom/discord/models/domain/ModelUserSettings;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string/jumbo v0, "userSettings"
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, v0, v1}, Lcom/discord/stores/StoreUserPresence;->updateSelfPresence(Lcom/discord/models/domain/ModelUserSettings;Ljava/util/List;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
.method public final observeAllPresences()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 8
|
2020-10-19 23:59:54 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;>;"
|
|
|
|
}
|
2020-10-15 19:48:59 +00:00
|
|
|
.end annotation
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v1, 0x1
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v2, 0x0
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
aput-object p0, v1, v2
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-instance v5, Lcom/discord/stores/StoreUserPresence$observeAllPresences$1;
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-direct {v5, p0}, Lcom/discord/stores/StoreUserPresence$observeAllPresences$1;-><init>(Lcom/discord/stores/StoreUserPresence;)V
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v3, 0x0
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v4, 0x0
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/16 v6, 0xe
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v7, 0x0
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static/range {v0 .. v7}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final observeApplicationActivity(JJ)Lrx/Observable;
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(JJ)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreUserPresence;->observePresenceForUser(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
2020-10-15 19:48:59 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-instance p2, Lcom/discord/stores/StoreUserPresence$observeApplicationActivity$1;
|
|
|
|
|
|
|
|
invoke-direct {p2, p3, p4}, Lcom/discord/stores/StoreUserPresence$observeApplicationActivity$1;-><init>(J)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->D(Ll0/k/b;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "observePresenceForUser(u\u2026 .distinctUntilChanged()"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final observeLocalPresence()Lrx/Observable;
|
|
|
|
.locals 8
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
|
|
|
|
new-instance v5, Lcom/discord/stores/StoreUserPresence$observeLocalPresence$1;
|
|
|
|
|
|
|
|
invoke-direct {v5, p0}, Lcom/discord/stores/StoreUserPresence$observeLocalPresence$1;-><init>(Lcom/discord/stores/StoreUserPresence;)V
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/16 v6, 0xe
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v7}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "observationDeck\n .c\u2026 .distinctUntilChanged()"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final observePresenceForUser(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUserPresence;->observeAllPresences()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreUserPresence$observePresenceForUser$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreUserPresence$observePresenceForUser$1;-><init>(J)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->D(Ll0/k/b;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "observeAllPresences()\n \u2026 .distinctUntilChanged()"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final observePresencesForUsers(Ljava/util/Collection;)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Collection<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string/jumbo v0, "userIds"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUserPresence;->observeAllPresences()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreUserPresence$observePresencesForUsers$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/stores/StoreUserPresence$observePresencesForUsers$1;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->D(Ll0/k/b;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "observeAllPresences()\n \u2026 .distinctUntilChanged()"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public snapshotData()V
|
|
|
|
.locals 8
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->fastCopy()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUserPresence;->presencesSnapshot:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->getUpdateSources()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getGatewaySocket()Lcom/discord/stores/StoreGatewayConnection;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/16 v6, 0xa
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/stores/StoreGatewayConnection;->presenceUpdate$default(Lcom/discord/stores/StoreGatewayConnection;Lcom/discord/models/domain/ModelPresence$Status;Ljava/lang/Long;Ljava/util/List;Ljava/lang/Boolean;ILjava/lang/Object;)Z
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
:cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final updateActivity(ILcom/discord/models/domain/activity/ModelActivity;Z)V
|
2020-10-19 23:59:54 +00:00
|
|
|
.locals 12
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-nez p3, :cond_4
|
|
|
|
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v3, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v4, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
check-cast v4, Lcom/discord/models/domain/activity/ModelActivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/activity/ModelActivity;->getType()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/activity/ModelActivity;->getType()I
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
if-ne v4, v5, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v4, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-10-19 23:59:54 +00:00
|
|
|
if-eqz v4, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v2, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_3
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p2, v2}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
xor-int/2addr p3, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p2, p1}, Lcom/discord/stores/StoreUserPresence;->replaceActivityInList(Lcom/discord/models/domain/activity/ModelActivity;Ljava/util/List;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getActivities()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreUserPresence;->removeActivityInList(ILjava/util/List;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_2
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v4, p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelPresence;->getStatus()Lcom/discord/models/domain/ModelPresence$Status;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-wide/16 v8, 0x0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/16 v10, 0x3c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const/4 v11, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-object v2, p1
|
|
|
|
|
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/models/domain/ModelPresence;-><init>(Lcom/discord/models/domain/ModelPresence$Status;Ljava/util/List;Lcom/discord/models/domain/ModelPresence$ClientStatuses;Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
new-array p1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
sget-object p2, Lcom/discord/stores/StoreUserPresence;->LocalPresenceUpdateSource:Lcom/discord/stores/StoreUserPresence$Companion$LocalPresenceUpdateSource$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
aput-object p2, p1, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreV2;->markChanged([Lcom/discord/stores/updates/ObservationDeck$UpdateSource;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserPresence;->meUser:Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p3, v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
check-cast p3, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
xor-int/2addr p3, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreUserPresence;->presences:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreUserPresence;->localPresence:Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-interface {p3, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_6
|
|
|
|
return-void
|
|
|
|
.end method
|