2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreGuildMemberCounts;
|
2020-09-22 07:09:10 +00:00
|
|
|
.super Lcom/discord/stores/StoreV2;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "StoreGuildMemberCounts.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
.field public guildMemberCountsSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Integer;",
|
2020-09-22 07:09:10 +00:00
|
|
|
">;"
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreV2;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sget-object v0, Ly/i/m;->d:Ly/i/m;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCountsSnapshot:Ljava/util/Map;
|
2020-09-17 00:45:48 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
.method public static final synthetic access$getGuildMemberCountsSnapshot$p(Lcom/discord/stores/StoreGuildMemberCounts;)Ljava/util/Map;
|
|
|
|
.locals 0
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCountsSnapshot:Ljava/util/Map;
|
|
|
|
|
|
|
|
return-object p0
|
2020-09-18 17:51:47 +00:00
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
.method public static final synthetic access$setGuildMemberCountsSnapshot$p(Lcom/discord/stores/StoreGuildMemberCounts;Ljava/util/Map;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCountsSnapshot:Ljava/util/Map;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
# virtual methods
|
|
|
|
.method public final getApproximateMemberCount(J)I
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCountsSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
check-cast p1, Ljava/lang/Integer;
|
2020-09-17 00:45:48 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
if-eqz p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
move-result p1
|
2020-09-18 16:51:32 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
2020-09-22 06:09:03 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
:goto_0
|
|
|
|
return p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "payload"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/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/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
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/ModelGuild;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
const-string v2, "guild"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v0, v2}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMemberCount()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-22 07:09:10 +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 handleGuildCreate(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "guild"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMemberCount()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, v1, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-09-22 07:09:10 +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 handleGuildDelete(J)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-09-22 07:09:10 +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 handleGuildMemberAdd(Lcom/discord/models/domain/ModelGuildMember;)V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "member"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, 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/lang/Integer;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
add-int/lit8 v0, v0, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v1, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildMemberRemove(J)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts: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/lang/Integer;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
add-int/lit8 p2, p2, -0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {v1, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
.method public final observeApproximateMemberCount(J)Lrx/Observable;
|
2020-10-05 23:18:16 +00:00
|
|
|
.locals 8
|
2020-09-22 07:09:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
2020-05-17 12:40:10 +00:00
|
|
|
.end annotation
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {}, Lcom/discord/stores/updates/ObservationDeckProvider;->get()Lcom/discord/stores/updates/ObservationDeck;
|
2020-09-17 00:45:48 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
move-result-object v0
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
const/4 v1, 0x1
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
const/4 v2, 0x0
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
aput-object p0, v1, v2
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
new-instance v5, Lcom/discord/stores/StoreGuildMemberCounts$observeApproximateMemberCount$1;
|
2020-09-18 17:51:47 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-direct {v5, p0, p1, p2}, Lcom/discord/stores/StoreGuildMemberCounts$observeApproximateMemberCount$1;-><init>(Lcom/discord/stores/StoreGuildMemberCounts;J)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
const/4 v4, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
const/16 v6, 0xe
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
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;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "ObservationDeckProvider.\u2026 }.distinctUntilChanged()"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, p2}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public snapshotData()V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-super {p0}, Lcom/discord/stores/StoreV2;->snapshotData()V
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCounts:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuildMemberCounts;->guildMemberCountsSnapshot:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|